Super.paintComponent() clears the component, then draws the new picture on it. That's what we see as flicker. JComponent.paintComponent() calls JComponentUI.update() which clears the component:
Code:
public void update(Graphics g, JComponent c) {
if (c.isOpaque()) {
g.setColor(c.getBackground());
g.fillRect(0, 0, c.getWidth(),c.getHeight());
}
paint(g, c);
]
You should override de update(Graphics) method and implement a double buffer technique, It's not as hard as it sounds. What you basically do is create an image the size of you component, draw on it, and when it's done, copy it to the Graphics of the component.
Here's (
Java Cooperation: double buffering) a link I found googling for "java double buffer paint". Experiment with that.