Hey,
Im currently making the GUI and basic workings of an instant messaging program for demo purposes, no actual messages are going tobe sent.
Ive made up a 'conversation' window where whats typed in a textfield is sent to a textarea as 'you said: ****', there will eventually be some form of reply to compelte the simulation ... anyway onto the problem.
Im going to have a main window with a list of names, on clicking a name a conversation will open up with the title 'conversation with xxxx' etc
Now this is all working quite nicely the thing im worried about is if you close the conversation window with:
setDefaultCloseOperation(EXIT_ON_CLOSE)
Both windows exit on close, if i comment this line out on the conversation class then only that window is closed but will this leave the process running ?!
I've also got a small menu setup with a few options to clear/copy/paste text from the conversation, also in the 'file' menu is the old fashioned 'quit' option ... when this is selected at the moment this is run:
System.exit(0);
This also kills both windows.
Is there a defaultcloseop for just that window as such and is system.exit the wrong command for this use also ?
Thanks in advance for any help.
Im currently making the GUI and basic workings of an instant messaging program for demo purposes, no actual messages are going tobe sent.
Ive made up a 'conversation' window where whats typed in a textfield is sent to a textarea as 'you said: ****', there will eventually be some form of reply to compelte the simulation ... anyway onto the problem.
Im going to have a main window with a list of names, on clicking a name a conversation will open up with the title 'conversation with xxxx' etc
Now this is all working quite nicely the thing im worried about is if you close the conversation window with:
setDefaultCloseOperation(EXIT_ON_CLOSE)
Both windows exit on close, if i comment this line out on the conversation class then only that window is closed but will this leave the process running ?!
I've also got a small menu setup with a few options to clear/copy/paste text from the conversation, also in the 'file' menu is the old fashioned 'quit' option ... when this is selected at the moment this is run:
System.exit(0);
This also kills both windows.
Is there a defaultcloseop for just that window as such and is system.exit the wrong command for this use also ?
Thanks in advance for any help.