File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Static / Dynamic JButtons and JPanels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Static / Dynamic JButtons and JPanels" Watch "Static / Dynamic JButtons and JPanels" New topic
Author

Static / Dynamic JButtons and JPanels

Tim Vanderbelt
Greenhorn

Joined: Jun 20, 2005
Posts: 2
Hello,

I am creating a java application that contains numerous 50+ Panels (JPanels) and each panel could contain upto 40 buttons (JButtons). Is it better to have a static instance of each panel (and buttons) or create it dynamically and allow the garbage collector to do its job? Would the static case use a lot of memory? Which instance would be faster?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Static / Dynamic JButtons and JPanels