setDefaultCloseOperation(DISPOSE_ON_CLOSE) not working with JDialog
Hello everybody
I'mt trying to figure out why setDefaultCloseOperation(DISPOSE_ON_CLOSE) and (HIDE_ON_CLOSE) are not working.
Infact, when I press the "X" to close window in the upper right corner, the JDialog popup close the entire application.
THe only one seems to work is (DO_NOTHING_ON_CLOSE) but I need to have a dispose() behaviour on my Popup.
Any ideas?
this is rows that I think are interested from the problem:
public PopupArticoli(JFrame frame,final ArrayList<CommessaBean> dati_commessa,final ArrayList<ArticoloBean> lista_articoli,final String source,finalint modifica_row){
super(frame,"Inserimento articolo",true);
...
setResizable(false);
pack();
setLocationRelativeTo(frame);
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
setVisible(true);

