I used the following code to make a circle. I need to make a button to save the coordinates of the circle. How do I extract these coordinates?
GraphicsContext gc = canvas.getGraphicsContext2D();
gc.setStroke(Color.BLUE);
Random rnd = new Random();
int x = rnd.nextInt((int) canvas.getWidth());
int y = rnd.nextInt((int) canvas.getHeight());
gc.strokeRect(x, y, 100, 100);