This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I would define a component to have an image and a rectangle, and have its paintComponent method render them both. To cause the rectangle to disappear set it to null:
There is no emoticon for what I am feeling!
Joined: Jun 08, 2005
Hello Jeff Thank you very much for your reply, now I am not sure how to do this can you give me an small code example. My component is a panel currently which in its paint method draws the image and this rectangle currently is drawn on the panel graphics is the mouse dragged along now how can i make the change you mentioned in this scenario?