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 - how to auto resize widgets when window is resized?

843806May 27 2007 — edited May 28 2007
I'm just experimenting with the GUI editor in NetBeans; really it's a fast to familiarise myself with the various Swing components, how they look and what they do. I have some experience of Qt, which uses spacers to ensure this happens. They also prevent the window from being resized to a size of 0:0.

When I resize my JFrame, the widgets disappear - what do I need to do to stop the widgets from disappearing and to ensure they are automatically resized to fit inside a window that is being resized? One trick I found was to set a minimum size for the window, but this doesn't resize the widgets.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2007
Added on May 27 2007
2 comments
452 views