Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Android Security Essentials Live Lessons this week in the Android 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
 
Similar Threads
JButton slow response time
Applet with sliding buttons.
images with swing
Which JPanel is the button on
resize buttons dynamically