get the Dialog associated with an event
So i have a Dialog with some textfields which hold the login information to a database. I press a button called "connect" which fires an event, which then connects to the database.
I want to read the textfields within the Dialog to assemble the Connection String but i have no idea on how to get the info through the event.
So far i have extended the JDialog with some methods like getUsername() which returns fieldUsername.getText();
But how can i get the MyDialog object?
getSource() returns only the button.
getSource().getRootPane returns only the RootPane.
Or is there even a better way to exchange this information?

