I've got an ActionCommand if statement, the first part of the loop which 'listens' for the action command of the 'Start Game' button. There are two buttons on the first panel, Start Game and Quit. The Start Game button works as expected and takes you to the second panel, which contains a Quit button - which works as expected(ie.the application closes). However, the quit button on the first panel doesn't seem to work. This is the same piece of code I've got in both panels for both buttons.
If (e.getsource=("quit")) {
System.exit(0);
}
Is this the correct way to 'exit' from a stand-alone program?
Now that I've pretty much got the program working,with the exception of the Quit button, I wondered if it's possible to save the program(I use JCreator) so that the file becomes an executable file. Just like in Visual Basic when you save the file as an Application and you can just locate the file on your hard drive, double click it and it will run, without having to open any other programs - is there any easy way to do this with Java?
If you can help me, thanks