This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Dispose Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Dispose" Watch "Dispose" New topic
Author

Dispose

Pavan Kumar
Greenhorn

Joined: Jan 13, 2002
Posts: 8
Hi when I try to cose thechild window, it is closing parent window also, can any one give the solution. Here I am giving the code.

Calling program :

SOInProcess jFrame = new SOInProcess();
jFrame.setSize(new Dimension(900,650));
Dimension logDim = jFrame.getSize();

int loginX = logDim.width;
int loginY= logDim.height;

jFrame.setLocation((x-loginX)/2,(y-loginY)/2);
jFrame.setVisible(true);


Called Program :


private void exitForm(java.awt.event.WindowEvent evt){
dispose();
// setVisible(false); //
}


pavan kuamr
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
We want to call dispose on each child window and to exit when the main, parent window is closed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dispose
 
Similar Threads
Displaying Splash Screen in NetBeans
Two Dimensional Array
Titlebar not showing up during swing printing
Window Size
Cannot Resolve Symbol;set PreferredSize