How to draw on top of an image in Java?

后端 未结 3 1351
既然无缘
既然无缘 2021-01-16 16:39

I used JFrame to import and display an image, and used mousemotionlistener to detect the mouse clicks, and I want to be able to draw on top of the image. I want to be able t

3条回答
  •  感情败类
    2021-01-16 16:48

    I figured it out, I can use the getGraphics() method of the JFrame to allow myself to draw on top of the image.

    edit: Andrew Thompson is right, minimizing the window removes the changes.

提交回复
热议问题