Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JFrame resize dynamically in response to content pane size changes



On Thursday, Jul 31, 2003, at 20:50 US/Pacific, email@hidden wrote:

Hi - I have a JFrame using GridBagLayout that holds a JToolBar, and a main JPanel that uses CardLayout. The CardLayout panel content is of varied dimensions. Is it possible to have the JFrame resize dynamically in response to the content of the CardLayout panel changing?

Sure is. Change to the new panel in the CardLayout, and then call "pack" on the window. Unfortunately, it doesn't give you the fancy resize animation... that's a bit harder. :-)

Cheers!
Andrew Miner
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.