I am creating an application that contains java.awt.Canvas to display a sequence of related nodes, as in a graph. when editing, the last point is attached to the mouse cursor using java.awt.geom.Line2D so that it is repainted every time the user moves the mouse, and this causes a really disgusting -flashy effect on the screen.
I have done this before, and I know that the solution was so easy and did not need really hard code, but to get around the paint(g) , repaint(g) and update(g) methods, despite this, I can not solve it and hope someone can help me!
Thank you very much in advance!:)
source share