some one please tell me how to close my output window..i wrote Button class program that executed successfully and displayed output window...i'm trying to close that window but that doesn't...please tell me short cut key to close that output window...i placed some methods like dispose() and System.exit(0) but not work..tell me some short cut key please.
I think this discussion would fit better in our GUIs forum. Moving.
Avoid System.exit. It can be a bit vicious. If you have several threads running and one has a incomplete task, the JVM will exit leaving the task unfinished and may corrupt your data.
What sort of “output window” do you have? Is it a Dialogue Window?
Closing a JFrame with a defaultCloseOperation of EXIT_ON_CLOSE also calls System.exit(0) (JFrame.java, around line 313).
So any application which might have a thread that needs to run to completion should use DO_NOTHING_ON_CLOSE and handle the exit in a WindowListener, or override processWindowEvent(...).
luck, db
There are no new questions, but there may be new answers.