Is is possible to get a reference to the frame and pack it so you don't need the exact size?

For instance in a Swing Application Framework based app, I may do this in the startup method:

this.getApplication().getMainView().getFrame().pack();

Thanks, Carl



Todd Volkert wrote:
That'll work, but it'll always hard code the size and location of the host frame. Alternatively, you can pass those arguments to your application at the command line.

On Fri, Oct 2, 2009 at 12:01 PM, Vicente de Rivera III <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I had that problem too before, here's my main method

         public static void main(String[] args) {
            if (args.length > 0) {
                noDb = true;
            }
            args = new String[]{"--width=800", "--height=650",
    "--center=true"};
            Locale.setDefault(new Locale("en", "PH"));
            DesktopApplicationContext.main(Main.class, args);
        }

    if you look at the code in DesktopApplicationContext, I'm sure you
    see the arguments there

    -
    thirdy


Reply via email to