posted 22 years ago
I want to use swing GUI components to have the user enter the IP address and PORT address if they are in server mode.
I want to do this with TWO different "JTextField".
Basically, I want a popup box that is MODAL. I want the user to fill in the two fields and hit OK or else hit CANCEL. I don't want the user to be able to do anything else until he has filled in those fields.
I don't think I can use the JOptionPane for this since I want two JTextFields (can I?)
When I use a JDialog box, that works find except that it isn't modal. When I use the command:
jdialog.setModal( true );
it has no effect.
When I pass it a "true" in the constructor, it makes the JDialog modal, but it puts it behind my JFrame, so my whole program freezes.
What can I use?