I have been recently working on a java project to just practice java and work on making programs for fun, but i came up upon this bug:
When i use Thread.sleep on my java program, it doesent execute the line above the try-catch block where i have my Thread.sleep.
heres the code:
button1.setIcon(red); //not using this line
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
button1.setIcon(white);