Howdy again,
I have an image that is a background, a buffered imaged to be exact. Then I put my components on top of that, like a button, a label, and other interesting things.
Then I have the DrawingPanel (you can see my other post here: http://www.java-gaming.org/forums/index.php?topic=13791.0) that handles drawing the image.
Works great. Except, the performance is not that great. Trying to render that image increases my CPU time by +20-30%. I also realize that I do not have to keep on drawing it over and over again because its the background of a window and thus, will never change. I know you can put an image in a JLabel, and that won’t cause a huge performance increase. I would do this with the background on this one but, I need to place comonents on top of the Label and that is not possible!
So, is there a way to draw an image only once and then not draw it again, or only redraw it if it happens to change, like the frame is resized?
Thanks.