Kajol,
Sorry, I usually slack off on here on the weekends... the faster internet connection at my office is so much better than my connection at home...
Here are the answers to your questions...
1.) It should be AbcApplet
not AbcApplet.java... AbcApplet.java is just the source code file... AbcApplet is the class you are creating objects from... in fact, if you were using AbcApplet, your code would look like :
2.) I added a windowListener ( an interface that listens for events related to windows ) by creating an anonymous inner class of WindowAdapter. Basically, I just created a new class inside my code to take care of window events in the frame that I made...
3.) Well, this code is not an Applet, it is a Frame... so init() would not mean anything special to it... but you could write an Applet that would use it, like so...
This code is very much like the main() method in the original program... but it is a new program... an Applet that uses the CardTest program I made earlier... the init() method is basically the same as the main() method of the original program, and I used the Applet itself to listen for window events from the CardTest frame, instead of using an anonymous WindowAdapter like I used in the CardTest main() method ( this is why I must put all the methods in windowListener inside the new applet ). The windowClosing() method, instead of calling System.exit( 0 ) now just makes the CardTest frame invisible. (Applets cannot call System.exit() because they are running inside the browser...)
HTH,
-Nate
[This message has been edited by Nathan Pruett (edited February 19, 2001).]