Java repaint not updating

The repaint() mechanism is not repainting, it does not erase the code previous to it in the graphic. JDK 1.1.7A and Swing, on Windows NT In a simple Java application I have a JButton "btn Go" and a JLabel "lbl Status" within a JPanel.You need to consider various things and you should be printing out many many many feeds to your terminal every execution.You have 274 possible locations this robot should be at and you need a way to distinguish what values these locations are getting.

I don't mean to ridicule your programming intentions but i think doing something like this project is kinda out there for you given your background of programming. Especially datastructures as important and fundamental as an array.Is there some way I can force the status label to repaint before the call to Thread.sleep? class My Action Listener implements Action Listener The GUI does not get updated until the event thread gets done.(Im pretty sure repaint() or revalidate() will wait also) Any long process that starts from the event thread should run in a new thread.If they don't do what i want, then i know what is wrong. But if repaint is a method that basically does what i think it name says it does, my guess is it changes the visual layout of a component in a gui? I would have to look at the API and test it out myself to fully understand it. Try to reduce the amount of lines of code you use, and don't declare local or global variables if you don't have to. (Because I didn't really know how to use an array : P)Here is how I solved the problem.But if you just blindly toy with things you will never figure out the issue. just to clarify: Sorry about the late response to all your replies. The problem is actually solved now, the issue was that I was stupidly trying to control and use a 'For' loop as an array.

Search for java repaint not updating:

java repaint not updating-25java repaint not updating-27java repaint not updating-37java repaint not updating-40

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “java repaint not updating”