View Single Post
Old 01-17-2013, 02:40 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Yep, looks to me that setting the preferred size still won't work until the frame is packed.
You can however issue a setSize on a panel and lock it to that size prior to calling a pack.
Another thing that would work as well would be to generate all the components first, place them on the panel and frame, and then pack it. After the pack then you modify what you need before setting visible. I'm not sure what Java does with this, but I don't think it paints a thing until you call the visible? If that's the case, you would need no listeners, and you can simply add the scaled image before showing the frame. If you need resizing though, you'll still need to add a listener to the items on the panel or the panel itself.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
CrashNsink (01-18-2013)