S
Scott
Hi,
I have a design question. I'm writing a Java app that displays a set
number of graphics drawn onto a JPanel. However, I only want one graphic
to be displayed at a time, allowing the user to use next and previous
buttons to move through all the available graphics. This, of course,
seems like an ideal use for the CardPanel layout. But, I have a question
about memory use and efficiency. If I end up pre-drawing 100 or so
cardpanels, isn't this really inefficient? Shouldn't I just use one
JPanel and then redraw it each time the next/previous buttons are pressed?
I suppose going the latter route means more of a wait moving between
images, while the former means a longer wait while everything is predrawn,
but faster movement between images. Does this seem correct? And for an
even simplier question - how would I cause the JPanel to be redrawn,
without redrawing the rest of my user interface? Thanks for any help!
Scott
I have a design question. I'm writing a Java app that displays a set
number of graphics drawn onto a JPanel. However, I only want one graphic
to be displayed at a time, allowing the user to use next and previous
buttons to move through all the available graphics. This, of course,
seems like an ideal use for the CardPanel layout. But, I have a question
about memory use and efficiency. If I end up pre-drawing 100 or so
cardpanels, isn't this really inefficient? Shouldn't I just use one
JPanel and then redraw it each time the next/previous buttons are pressed?
I suppose going the latter route means more of a wait moving between
images, while the former means a longer wait while everything is predrawn,
but faster movement between images. Does this seem correct? And for an
even simplier question - how would I cause the JPanel to be redrawn,
without redrawing the rest of my user interface? Thanks for any help!
Scott