• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

application to applet conversion

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Could anybody please extend helping hand how I can convert a Swing program to an Applet. I have developed a Java application using Swing and now I want to implement it in Web. So should I write the same program using applet or is there any method by which I can convert it to an Applet so that I can call the applet through applet tag from html code.
regards,
Khyama
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First there is an appletforum. (and a swingforum too).
Second: due to appletrestrictions (box of concrete) you may ran into problems.
If there are no such restrictions, you may look at simple applet requierements - they don't have a main-method but some other kind of init. And you need a little html-page.
I would refactor the Class containing main, extracting everything which is needed for an applet too, and try to only create a JFrame in this.
Then create an applet-class, which starts in an appletway.
Both could be able to create the rest of the application.
So you would end with a programm with two entrypoints.
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmmmm I think I'll move this to the Applet forum seeing as though your main question is how to convert an application to an applet.
I'd do a quick search on java.sun.com -- I'm sure they have tutorials there that cover this topic.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic