HI,
I draw a rectangle on a class that extends from component .
g.drawrect(x,y,width,height);
but i want to remove it how do i do that;
g.clearRect doesn't work
Kind regards,
Michael55131
Printable View
HI,
I draw a rectangle on a class that extends from component .
g.drawrect(x,y,width,height);
but i want to remove it how do i do that;
g.clearRect doesn't work
Kind regards,
Michael55131
You haven't provided an SSCCE, so I'm only guessing. You can't "remove" something from being painted. You can, however, surround it with an if statement and toggle whether it's painted or not.
You can paint that component again with the background's colour, usually white.