I am using a JDialog to display a JTable of rows. If a specific row is double-licked, I want to close the JDialog. I have a listener for the MouseEvent, to get the click count. But how do I force a WindowEvent(Window closing action) from the MouseEvent? Is this even the correct approach? Thanks for the help (past and present)
Here's the scenario: 1. User displays a JFrame with JTextFields 2. One of the JTextFields has a button to look up a list of choices. Each of the choices has multiple attributes, so: 3. The choice list is actually a JTable/Scroll Pane, within a JDialog. 3. The user selects a choice and exits the JDialog. The selected choice is used to pop- ulate the original JTextField. I just want the user to be able to double-click the choice, which would make the selection, AND close the JDialog. Makes sense?
So... Given that scenario, can I somehow force a Window Closing event? If I use the dispose method, the Dialog is garbage collected (apparently immediately), and I cannot retrieve any of its attributes (I CAN get the attributes after WindowClose is executed). Any ideas?