• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet

 
Sarish, pillai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can we have a main method for Applets
------------------
Thank You
Sarish
 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sarish,
I have never seen an applet with a main() method. I am curious as to why you might want one. Is the init() method insufficient for your needs?
Stephanie
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sarish,
Actually, yes... you can put a main() method in an applet. The only time I have seen this done is to be able to run a program as either an applet or an application, though usually all the main() method does then is to create a frame, add a windowListener to it, add the applet to the frame, and start the applet.
Hope this helps,
Nathan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic