How do I clear what I've drawn? In particular, a string that's been drawn using the drawString method in Graphics2D?
I had to create a discrete-event simulation application for some situation that was given to me (for a school project). For bonus marks, I have to design an applet to animate the simulation.
Right now, I plan to have 8 boxes on the screen. Four for the four servers, and four for each server's respective queue. I want to write in the boxes information about each queue or server. For each queue, I'm just going to write the length of the queue, and for each server, whether a person is being serviced or not.
I have everything set up. My only problem is that when I call repaint, and the strings are redrawn, what was there before isn't cleared. For the boxes, it doesn't matter, since they stay in the same position. But how do I clear what was drawn before? Thanks for the help. Hiran