urindar
04-07-2004, 08:18 AM
Hi there!!!
I have a small application using frames and dialogs and I have a problem with the windowClosing() method.
I have added WindowListeners to the frame and the dialog box, but my problem is that when I try to close the dialog, I just want to close the dialog, not the entire application... and inside the windowClosing method I cant find a way to tell whichone is trying to be closed, the frame or the window...
:confused:
private Dialog d = new Dialog(f, "my dialog", true);
private Frame f = new Frame("my frame");
.
.
.
public void windowClosing(WindowEvent e){
f.dispose();
}
At this time I just kill the frame... =(
I have a small application using frames and dialogs and I have a problem with the windowClosing() method.
I have added WindowListeners to the frame and the dialog box, but my problem is that when I try to close the dialog, I just want to close the dialog, not the entire application... and inside the windowClosing method I cant find a way to tell whichone is trying to be closed, the frame or the window...
:confused:
private Dialog d = new Dialog(f, "my dialog", true);
private Frame f = new Frame("my frame");
.
.
.
public void windowClosing(WindowEvent e){
f.dispose();
}
At this time I just kill the frame... =(