+ 1
how can i use moveTo function to move a rectangle in swing ?
1 Answer
+ 12
You need to repaint/draw the shape after assigning the new position by the moveTo method.
General example for moveTo:
http://www.java2s.com/Code/Java/2D-Graphics-GUI/GeneralPath.htm