Canvas blinks when constantly repainting
<p>I'm making an app which contains a <code>java.awt.Canvas</code> to display a sequence of conected nodes like in a graph. while editing, the last dot is conected to the mouse cursor with a <code>java.awt.geom.Line2D</code> so that it must be repainted everytime the user moves the mouse, and it causes a really disgusting -flashy- effect on screen.</p>

<p>I did this once before, and I know the solution was so easy and didn't need a really hard code, but to mess around with <code>paint(g)</code>, <code>repaint(g)</code> and <code>update(g)</code> methods, despite it, I cannot manage to solve it and hope someone can help me!</p>

<p>Lots of thanks in advance!! :)</p>
