CardLayout performance
843806Jan 16 2008 — edited Jan 18 2008Hi 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