[Solved] Drawing an unknown number of shapes [closed]

Check out Custom Painting Approaches It shows the two common ways to do this: Keep an ArrayList of Objects to paint and then iterate through the List in the paintComponent() method. Paint directly to a BufferedImage and then just display the BufferedImage. solved Drawing an unknown number of shapes [closed]

[Solved] Change Coordinates directely in the graphe [closed]

Take a look at Oracle’s tutorial: http://docs.oracle.com/javase/tutorial/2d/advanced/user.html They describe how to recognize clicks within the Graphics2D. They also show how to move a single shape. You have to advance this approach a little bit in order to support multiple elements. 1 solved Change Coordinates directely in the graphe [closed]