How do I create a timer compatible in an oriented program JFrane / JPanel where it just waits for 1 second and then continues with the rest of the code?
JFrane
JPanel
I don't want to use Thread.sleep(); as it is causing problems for me.
Thread.sleep();
You can use javax.swing.Timer for such tasks . It integrates with Event Dispatching Thread (EDT).
TimeUnit.SECONDS.sleep(1)
More info here: How to delay Java?