Hello !
Please help me to solve the following problem:
I create the class (extended from JDialog) from other class (extended from JFrame).
class dialog extends JDialog implements ActionListener{
.............
public dialog(frame fr){super(frame,"Dialog window",true);}
.............
protected void actionPerformed(ActionEvent ev){
JButton b=(JButton)ev.getSource();
if(b==nobutton){setVisible(false);dispose();}
//this code closes the parent window !!!
}
}
class frame extends JFrame{
}
I can't understand why the parent frame hides automaticaly when i close or hide the modal dialog.
Thank you very much !
Please help me to solve the following problem:
I create the class (extended from JDialog) from other class (extended from JFrame).
class dialog extends JDialog implements ActionListener{
.............
public dialog(frame fr){super(frame,"Dialog window",true);}
.............
protected void actionPerformed(ActionEvent ev){
JButton b=(JButton)ev.getSource();
if(b==nobutton){setVisible(false);dispose();}
//this code closes the parent window !!!
}
}
class frame extends JFrame{
}
I can't understand why the parent frame hides automaticaly when i close or hide the modal dialog.
Thank you very much !