Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Dispose" Watch "Dispose" New topic


Pavan Kumar

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;


Called Program :

private void exitForm(java.awt.event.WindowEvent evt){
// 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:
subject: Dispose
It's not a secret anymore!