java - How to continue draw something on JPanel after clicked the button without repaint? -
i have define jpanel
named drawpanel
, , button named jbutton1
actionlistener
. want continue draw on drawpanel
after clicked jbutton1
. , not want clear drawpanel
first , draw more things, want continue draw on drawpanel
, show in jframe
.
check out custom painting approaches 2 common ways this:
- keep list of objects want paint , iterated through list every time.
- paint bufferedimage , paint bufferedimage.
Comments
Post a Comment