Simple Questions- Stop JPanel Blinking
I have a JPanel called "display" that i add to the Frame. Originally I drew directly to the Graphics object of "display" and the display did not blink. Now I've realized I will need to have a few layers because I need to utilize some JComponents so I've created a JPanel called "GameDisplay" and added it to the "display" JPanel. JPanel is still added to the frame and "GameDisplay" to "display". Now I draw directly to the graphics object of "GameDisplay". However, now every time paintComponent is called the whole screen blinks. Everything wipes to the frame's background color momentarily then I can see the JPanel drawn (I have a 16bit video card so this is very visible to me). I think there is a way to stop the screen from clearing before it draws again. How is this done?