Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JFrame.setExtendedState()

843802May 31 2010 — edited Jun 1 2010
I'm using
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
        frame.setVisible(true);
in a Swing application. The application works great with it occupying the whole of the screen when executing from the command line using both Ubuntu 9.10 and Windows XP. It also works when executing through WebStart on Windows XP when initiated both though IE 8.0.6 and Firefox 3.6.3.

When executing though WebStart Ubuntu 9.10 with Sun/Oracle JDK1.6.0_20 initiated using Firefox I end up with just a very small rectangle in the top left hand corner of the screen. I can resize the rectangle by dragging one corner so I can see that the application is functioning correctly apart from this one niggle.

Any Ideas about what I am doing wrong?

Edited by: sabre150 on May 31, 2010 2:40 PM
I have a partial work-around! I now have
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
        frame.setVisible(true);
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
which now results in a maximised frame using WebStart and Ubuntu 9.10 . BUT - the frame flickers a couple of times on startup.

There is obviously a right way to do this but what the hell is it?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2010
Added on May 31 2010
5 comments
366 views