Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CardLayout performance

843806Jan 16 2008 — edited Jan 18 2008
Hi all,
I need to develop a Java application using Swing that shows a large number of Panels, one at a time in sequence.
The solution I think should be a CardLayout or something similar.
Every Panel is composed of a large image as background (actually ~1MB at 1024x768 pixels).

The CardLayout does it's job, but it's slow: when I call the second Image (i.e I click on a Button in first Panel) it shows a blank page and the final Panel will load in some time.

There's a way to optimize the CardLayout (reduce loading time between Panels)? What can I use instead of a CardLayout?
I noticed also a problem with the memory usage, I have nearly 50/100 images (is to say Panels). How can I optimize the Application.

Any suggestion should be appreciated, thanks in advance,
Ale
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2008
Added on Jan 16 2008
15 comments
416 views