Stop and exit a program from within the program.

How do you stop and exit a program from within the program.I have a while loop started by a button and I want to use another button to exit the loop and the program.Message was edited by: jdk2006
[223 byte] By [jdk2006a] at [2007-11-27 9:20:21]
# 1
You should use a separate thread for your for-looping task. Otherwise the task robs the control from GUI disabling other buttons et al.See http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html
hiwaa at 2007-7-12 22:13:23 > top of Java-index,Java Essentials,Java Programming...