Whenever I open a JOptionPane.showInputDialog, the program I am writing comes to a "halt" and it waits for input. Or if I have a message dialog, the program halts and waits for the user to click Ok before proceeding with the rest of the code.
I created a JPanel that displays a picture and a button, however, when I run it and it shows set visible equal to "true", the JPanel appears, however, the program continues to run anyway down the other lines of code and does not stop.
Is it necessary to create listeners or boolean's in order to halt the program's current progress until an action is taken on the JPanel/JPane, or is there a simple way for the program to wait for a user's response to a JPanel/Jpane before proceeding?