I'm trying to write a class that is a custom JDialog. It has a JTextField for a Username, JPasswordField, and then a third JTextField which is labled in the constructor. The purpose of the dialog is to enable users to log on to a domain, database, etc. I included a getInput method which returns an array of Strings with the inputs.
How can I get the parent frame to grab the
string array from the JDialog? Also, what code do I need to write to close the JDialog? I've worked with frames and know how to write a WindowListener for the closing, but how can I make the window close itself when the user clicks on an "enter" button( in the JDialog ) and still get the parent app to grab the information.
Thanks for whatever help you can give me.