Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keep a application running while closing the other

Status
Not open for further replies.

Fishier

Programmer
Jan 21, 2009
5
ZA
Hi,

I have a parent application that opens a child application. When I close the child application then the parent application closes with the child application, but I want the two applications to be independent of each other. I can't create the child application without the parent application since the parent application is used for test purposes.

Thanx
 
Avoid using System.exit in the child, since this will terminate the JVM (and is a common mispattern).

EXIT_ON_CLOSE is bad for the same reason.

Just call dispose () on the childwindow. This will terminate the JVM only after the last program calling dispose. You aren't bound in closing them in any order.

don't visit my homepage:
 
Thank you it is working with the dispose()!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top