This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.
"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 ]
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:
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.