| Author |
Control the minimum size of a JFrame
|
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
Sorry about posting what's probably a trivial question to you SWING Gurus, but ... I have a resizable JFrame as the outermost container of my SWING application. How can I restrict the minimum size to which it can be set? While I'm here, some slightly harder, related questions: - Can this be automatically calculated from the minimum sizes of the contents - in this case a split pane containing another split pane (containing a scrollable tree and a scrollable table) and a desktop pane? How can I best ensure that split panes maintain sensible positions as the container which holds them is resized?
|
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
|
 |
Rob Ross
Bartender
Joined: Jan 07, 2002
Posts: 2205
|
|
Originally posted by Peter Chase: Sorry about posting what's probably a trivial question to you SWING Gurus, but ... I have a resizable JFrame as the outermost container of my SWING application. How can I restrict the minimum size to which it can be set? While I'm here, some slightly harder, related questions: - Can this be automatically calculated from the minimum sizes of the contents - in this case a split pane containing another split pane (containing a scrollable tree and a scrollable table) and a desktop pane? How can I best ensure that split panes maintain sensible positions as the container which holds them is resized?
Sadly, you cannot restrict the size of a JFrame. It's a native peer, so it's being drawn by the native OS, and java doesn't provide you an API to access this kind of functionality. Maybe in a future version. Rob
|
Rob
SCJP 1.4
|
 |
 |
|
|
subject: Control the minimum size of a JFrame
|
|
|