The item menu About
of my JFrame
is a JDialog
that can be closed thanks to a but button as you can see below:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
aboutDialog.this.dispose();
}
sometimes when I click on the close button of the JDialog
, it actually closes the entire program.
I tried:
aboutDialog.this.setvisible(true)
aboutDialog.this.setDefaultCloseOperation(EXIT_ON_CLOSE);
aboutDialog.this.setDefaultCloseOperation(HIDE_ON_CLOSE);
aboutDialog.this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
But it didn't worked, any ideas?