How to clean a part of a component?


Hi all,

Can I somehow wipe some part of a child component to make it transparent and see what’s behind it?


er… just don’t draw anything in the bit that you want to be transparent?!


hmm, I have a specific case, where a part of some already drew component should be deleted to show its background… Or do you mean, that I can just perform repaint(x, y, w, h) on required areas and they’ll become transparent then?


Sounds like you haven’t quite got your head around the way paint()/repaint() works. Components don’t contain painted stuff that gets added and deleted, the paint() method draws all their contents from scratch, each time it needs a repaint. If you want a blank space, just make sure your paint method won’t draw anything there, and do a repaint if necessary.


Oh, now I see. Thanks.