aspose 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
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
 
Similar Threads
Applet with sliding buttons.
JButton slow response time
resize buttons dynamically
images with swing
Which JPanel is the button on