Application.exit

Overview | Methods | This Package | All Packages

Application.exit

Quits the message loops of all threads in the application.

Syntax

public static synchronized void exit()

Remarks

The exit method revokes all running message loops on all threads and closes all windows. If you want only to exit a message loop for the current thread, call the exitThread method instead. Because the application's thread is started within the main method of the startup form, calling the exit method does not actually force the application to quit. Instead, it causes all calls to run to return. If you have any code after the call to run in the main method, this code is executed.