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);

[1250 byte] By [Pentolinoa] at [2007-11-27 9:30:22]
# 1
The problem must lie elsewhere within your code... create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",see http://homepage1.nifty.com/algafield/sscce.html,that demonstrates the incorrect behaviour
c0demonk3ya at 2007-7-12 22:41:37 > top of Java-index,Desktop,Core GUI APIs...