This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a Panel that has a Panel inside (to get some inset in my Panel.) The problem is, that it just works, if I draw into the main Panel. If I try to get the Graphic context of my other JPanel and write into it, I just see my drawing for breaks of seconds when I rezise the Frame (where the JPanelis inside). If I don't resize, I see nothing, if I finish resizing, the same.
Here ist my Code. Maybe the paint-Method is just called when resizing now?
Can anyone help ? Is there another possibility to get some inset for my drawing Area?
Here is my Code:
[ July 29, 2004: Message edited by: Raschin Ghanad ]
Since you didn't override screenPanel's paint method, it is probably painting itself over your own paint efforts. Have a gander at the Custom Painting chapter of the Java Tutorial for some more detail.