Java repaint not updating
It displays a table with 5 rows, with some random strings, and updating with the current date.It is designed to be an actually complete example, for those of us that understand the idea of what is said above, but not necessarily how to go about doing that.
This happens when the component is first displayed, but it can happen again if the user minimizes the window that displays the component and then restores it or if the user moves another window over it and then move that window out of the way.Being a beginner in Java does not mean that you can't try to solve your problem. Timer; public class Clock extends JFrame implements Action Listener Well I'm not going to just do it for you as that's not what we do here.What you need to do though is create a Timer field in your class (just like the labels etc). Being a beginner in Java does not mean that you can't try to solve your problem. Timer; public class Clock extends JFrame implements Action Listener Changing one of the properties, here the text of a JLabel, of a JComponent fired a repaint() on that component.redraw the window), each time the mouse is being clicked so this is possible with the use of repaint () method. SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A , SCJP certifications.To sum up, the repaint() method is invoked to refresh the viewing area i.e. Dinesh authors the hugely popular Computer Notes blog.