java - Graphics.clearRect() won't work for me -
Hi, I have searched the web for a while but the solution to solve me does not work for me, so here is my problem I am creating graphs on my GUI using graphics and drawl (), which works perfectly for me - for the first time when I use my program in the same area I say to keep the graph, so it only spoils things. Public Zero Paint Free (Graphics G) {super.paintComponent (g); Int max = 100; G.clearRect (0, 0, 205, 200); & Lt; - g.drawRect (10, 10, 200, 200); G.drawString ("+ + Max, 0, 10)"; G Drline (5, 110, 10, 110); G.drawString ("0", 0, 275); ... attracting the actual graph here. Now it was the idea that every time I have to draw it that I keep a white surface for the first time, so it removes anything pulled earlier but it does not work. I'm new enough for graphics, please do not hesitate to comment if I am doing it completely wrong. Thanks Advance. / P> -Alex