Log in

View Full Version : layout managers and j2me


wrappingduke
05-24-2008, 08:44 PM
hello,

Currently using jsr-62 or CDC/PP for Pocket PC. I have a couple of java beans (different dialogs) that are plugged into the ppc app. The ppc app is a frame that calls the dialogs(beans). The dialogs are using primarily GridBagLayout as the layout mgr. However, the dialogs and their components are not fully displayed or viewable on the PPC. The dialogs are maximized to screen size rather than w/in the frame of the PPC app.

Is there are way to show the dialogs w/in the frame of the ppc app or not maximized as though setSize(Toolkit.getScreenSize) has been used?

Here's a sample of the code in the PPC app:

PPC_app extends java.awt.Frame
{
PPC_app
{
// constructor
}
dlgAccount1 = frmAccountSearch.dlgAccount(this, true);
}

any help is appreciated.

wrappingduke
06-02-2008, 08:08 PM
wondering if there's a method that can be used to show a window(i.e. dialog) within a frame (much like an MDI form). That is, all windows are shown w/in the frame's border or title bar.
Here's what I have attempted but to no avail:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p><o:p> </o:p>java.awt.Dimension screen = getDefaultToolkit.getScreenSize();
java.awt.Insets frameInsets = this.getInsets(); // frame's insets
// set bounds of child (window)
window1.setbounds(frameInsets.top, frameInsets.top,
screen.width - frameInsets.top -2, screen.height - frameInsets.top -2);
<o:p> </o:p>
any help is appreciated