• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to write a program that can be used both as applet and application

 
Praveen palukuri
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
is there any way to write a program that can be used both as applet and application.

thanks
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just add main() method to your applet.



 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the Applet FAQ, which is linked in my signature, for two approaches, depending on whether your code is an applet or an application.

[ UD: moved the original content to FAQ ]
[ November 15, 2005: Message edited by: Ulf Dittmer ]
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!