View Single Post
  #1 (permalink)  
Old 06-11-2007, 10:56 PM
Marcus Marcus is offline
Member
 
Join Date: Jun 2007
Posts: 92
Marcus is on a distinguished road
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.

Marcus
Reply With Quote
Sponsored Links