Adding shapes to JPanel on a button click

前端 未结 2 1411
星月不相逢
星月不相逢 2021-01-06 11:33

I have a Class Circle with a button and a Class with a jPanel what i want to do is when that button is clicked a circle will be drawn on the panel and each time i click that

2条回答
  •  不知归路
    2021-01-06 12:11

    You are overriding the paint method of Circle. You need to be overriding the paint method of the panel.

提交回复
热议问题