Part of my function looks like this:
jLabel2.setBackground(Color.YELLOW); jLabel2.setText("Status : Idle"); boolean ok=cpu21.RestartSSH(); if(ok){ jLabel2.setBackground(Color.GREEN); jLabel2.setText("Status : Run"); }
Before I enter the Green and Run function label, but when I enter the function, it does not change color to yellow (the RestartSSH function takes 5-6 seconds, but during this time the labels do not change colors and captures). Where am I mistaken in painting?
Damir source share