Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i create applications using applets ?

 
sunil mirani
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created applets using swings and awt but i dont know how do i put these together !! please help !! If you have the code or if some URL ...it will be great!! thanks
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An applet is an extension of Panel... so you can add it to a Frame to make a stand alone application... however, some of the functionality of the applet class is not available, such as the URL, AppletContext, etc... so you can use some code like the following to test your applet out in an application environment, but you may need to add some changes to make it work correctly...



Not sure if this exactly answers what you wanted... since you could just run the applets in appletviewer to make an applet "run like an application"... but if this helps, great... if not, please try to explain in more detail what you are trying to do...
HTH,
-Nate
 
karan, chopra
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nathan,i tried doing the above but it doesnt work.. ..dunno why.it doesnt recognise the command "Applet = //my applet name;" and says "cannot resolve symbol"..
kindly help
regards
karan
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Replace the commented out applet name with an actual object of your applet class. For example, if you had made an applet class called KarenApplet.class, you would replace the line:



with:



-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic