This is a greenhorn question but it is about Swing.
I have a program which is processing and has an error message to display
so it calls a message-display program (so all messages look alike in the application).
The calling program is editing data entered into a JTextField and the processing is
occurring in the actionPerformed area.
I have Focus Listeners on the JTextFields and am processing a selectAll() statement when a
field is focussed on. Also, in the fields in question in this
test, I have added a println "Focus Gained jtfieldname".
During execution, the calling program continues on past the message program call even though
the message program has not issued a return. It seems to me that the calling program should wait
for the called message program to complete before continuing on.
The calling program has the following code:
And the message program has the following code to display after the after the
JLabels are defined.
When I run the application and cause the error condition, the following message sequence prints:
At this point, I have not clicked on the Return button in the message program.
But the calling program has continued processing.
After I click on the Return button in the message JFrame, the println displays:
Why does the calling program not wait for the Return button to be pressed in the message program
before continuing on in its processing?