Hello, Can anybody please tell me that how can I repaint my Frame over which I have drawn through paint method by clearing the previously drawn images.
posted 14 years ago
Hi, can you tell us, what you want to do? Do you overwrite the paint method of the JFrame or some Component to display images? Do you use the mouse to display something? Anyway, you can use the mouse event to ask for the current position and you can remember the last mouse position. Then you can calculate a rectangle. With it's help you can call the repaint method of your drawing component.