• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How do i create applications using applets ?

 
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • 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
 
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 Spring Java
  • 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
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic