I have a Java code and I want to show a waiting message during the elaboration. The program it's very long, I write a simply test to explain my problem:
public void actionPerformed(ActionEvent evt){
showMessage.yes();
for(int i = 0; i < 9999; i++)
System.out.print("wait");
}
The method yes()
only contain a JFrame.setVisible(true)
command that should show a frame with the message "waiting". The problem is that in this case the frame is showed but the content of the frame (buttons, labels etc) doesn't show until the end of the for. Obviously if in this method I leave only the showMessage.yes()
the frame is showed without problems...