aspose file tools*
The moose likes Beginning Java and the fly likes how to convert an applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to convert an applet" Watch "how to convert an applet" New topic
Author

how to convert an applet

ima clark
Greenhorn

Joined: Apr 23, 2002
Posts: 19
I have an applet that i need to convert to an application that can be downloaded and run locally. Do you know of any good articles or have any advice on the simplest way to go about this? Thanks for your help.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

The main difference between an applet and an application is the program's entry point. An application contains a main() method, and an applet will contain an init() method and/or a start() method. There are other methods that applets can override like destroy() and stop() but you don't have to use those.
So in it's simplest form, you can convert an applet to an application by adding a main() method or changing the applets init() method to a main() method.
There are other scenerios where it won't be this simple. It depends on how complex your current applet is. Hope that helped a little though.


GenRocket - Experts at Building Test Data
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
To quote from one of my favorite Java books:
From Mr. Bunny's Big Cup o' Java

"You want to have an out-of-browser experience! It's tricky, because you have to hook your applet up with all the support it expects from the Browser."
"You mean like in those creepy old movies when the mad scientist keeps a fellow's brain alive in a Jello mold?" asked Farmer Jake.
Mr. Bunny nodded....

[ September 13, 2002: Message edited by: Dave Landers ]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
It would seem to me that you'd do well to study up on how Java applications work. Then, when you have this basic understanding, the process of converting an applet to an application should be straightforward.
Here is a list of free Java tutorials that I have found useful:
  • Sun's Java Tutorial
  • Introduction to Computer Science using Java by Bradley Kjell
  • Introduction to Programming Using Java by David J. Eck
  • Dick Baldwin's Java Programming Tutorials

  • The first few lessons of Sun's Java tutorial demonstrate using Java applications.
    Part of understanding this process is understanding the life cycle of a Java applet. So, I recommend taking a look at the Writing Applets trail of Sun't Java tutorial.
    If you have a simple example that you'd like help working through, just post the code, explain what you're doing and what you understand and what you want to do, and ask some questions.
    Good Luck.


    [How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: how to convert an applet