G
Guy
Hello
Ive seen tons of posts on this subject, but none of them reaaly helped
me with this particular problem. Im new to JAVA graphics but not to
java itself.
I have a JFrame with two buttons and a JPanel on it. when I push a
button a quite complicated process takes place (including database
access etc.) which results in an image drawn on the JPanel.
Now this image disappears whenever I resize the main frame. I managed
to make it draw again using repaint() and running the whole process
again each time the frame resizes, like it is said on many books and
websites. But this is very slow and resource consuming.
Is there a way to just save the image (maybe the Graphics2D object ?)
and redraw it again without all the hassle of constructing it from
scratch ?
Thank you
Guy
Ive seen tons of posts on this subject, but none of them reaaly helped
me with this particular problem. Im new to JAVA graphics but not to
java itself.
I have a JFrame with two buttons and a JPanel on it. when I push a
button a quite complicated process takes place (including database
access etc.) which results in an image drawn on the JPanel.
Now this image disappears whenever I resize the main frame. I managed
to make it draw again using repaint() and running the whole process
again each time the frame resizes, like it is said on many books and
websites. But this is very slow and resource consuming.
Is there a way to just save the image (maybe the Graphics2D object ?)
and redraw it again without all the hassle of constructing it from
scratch ?
Thank you
Guy