Hi there.
I have a program consisting of 4 classes at the moment:
MainProgram.java class
FileProcessor.java class
FileCreator.java class
ServerCommands.java class
The MainProgram class provides an interface where somebody can input a file name and press a button 'Go'. This file name is then passed to the FileProcessor.
The FileProcessor class interprets the data in the user input file and passes some of the interpreted data to the FileCreator class, which stores this data in a new file.
Having done this, the ServerCommands class is then invoked, which issues commands that uses the file to a statistical server that interprets these and produces a statistial output. However, as this takes some time to do and plots the data in a new window that needs to ineractive while open, I created a new
thread, called myThread, so that the GUI created by the MainProgram class is still accessible and functional whilst this is going on.
However, on the MainProgram GUI I have a button 'Reset'. What I would like to know is how I can stop the thread from this MainProgram class.
To invoke the FileProcessor class from the MainProgram, having cliked the Go button, the following code was used:
Here is the bottom of the FileCreator class
The ServerCommands looks like the following:
In the MainProgram class, I would like to stop the thread from within the code used to create the reset button which is currently:
Any ideas??
Thanks
Sam
[ July 08, 2007: Message edited by: Sam Bluesman ]