Hi!
I'm working on a simple application where is an JFrame, and 2 JPanels on it.
I would like to write an simple motion with these JPanels. I implemented a simple version, but there is some flickering on the screen. How could I solve it?
Here is my code:
Please help me...Jpanel c3 = new JPanel(); Graphics g = this.getGraphics(); c3.setLocation(30, 30); for(int i=0;i<100;i++) { c3.setLocation(130 + i, 30); this.update(g); //this is currently the JFrame.update try { Thread.sleep(10); } catch(InterruptedException e) { e.printStackTrace(); } }