aspose file tools
The moose likes Swing / AWT / SWT and the fly likes problem with closing JDialog created with JFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "problem with closing JDialog created with JFrame" Watch "problem with closing JDialog created with JFrame" New topic
Author

problem with closing JDialog created with JFrame

dave sheffield
Greenhorn

Joined: Sep 26, 2003
Posts: 1
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 !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with closing JDialog created with JFrame
 
Similar Threads
JDialog With Icon
JDialog Question
Dialogs lose focus when minimizing and restoring the application
Calling JDialog from JDialog - Urgent please...
fix JDialog position relative to its parent JFrame component