|
-
September 14th, 2000, 12:37 PM
#1
Need help redrawing/sizing JPanels
Here's the situation:
I have a JPanel (call it mainPane) contained within a JFrame (call it mainFrame). It is added via
mainFrame.getContentPane().add(mainPane);
To mainPane I am adding and removing other JPanels. What I would like to do is that whenever a JPanel contained in mainPane is removed or set invisible the window shrinks to show the deletion, so that the space taken up by the pane is no longer there. Right now whenever a pane is set invisible it still takes up room, and so the window doesn't shrink. I'm left with these big empty spaces.
Any ideas would be most appreciated.
Thanks!
"There's nothing more dangerous than a resourceful idiot." ---Dilbert
BWAHAHAHAHAHAHA! ---Murray
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|