Close a JDialog Programmatically
Do you know how can I close a JDialog from the code? the problem is the following
I have a dialog with an interface a little bit hard, and 2 buttons: accept and cancel
I want that when the user does click in accept saves the changes and closes the windows
And when he clicks in cancel button closes without doing anything.
I did that a JDialog be an ActionListener of the buttons, and when I click in some button, according to the string of the ActionCommand that comes in the ActionEvent as parameter of the method actionPerformed that implements JDialog.
The problem is that I can't close the dialog.