Re: Problem with applets!!
If you're trying to run this as an applet, you're doing it all wrong. In fact your code is not GUI code at all, but rather a simple console program.
First and foremost, decide what you want: a simple console program or an applet GUI. If the latter, then you'll need to read an applet tutorial as it will help you to understand what you need (such as an init method).
Re: Problem with applets!!
I just want to run the programme, whether simple or applet. I was forced to do applet by the compiler because when i clicked run, instead of running, it gives me option to run in either java application or applet. Please tell me how can i run this programme in simple
Re: Problem with applets!!
Remove the "extends JApplet" which will make it a simple console program.