English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hey I've been using java to program for about a year now for uni. The problem is that I can't find many games tutorials which are in application form, they are all applets. Now I know by now I should know the difference between the two and how to use applets, is it possible to easily change an applet to application? whenever I try adding things such as main methods and what not I still get errors.

PS I'm using JCreator, to my knowledge it doesn't compile applets which is why I don't want to start using applets, but if you know any good applet editors...

2007-02-20 22:41:21 · 4 answers · asked by normthesamurai 2 in Computers & Internet Programming & Design

4 answers

There should be no problem converting an applet to an application, as long as it doesn't rely on using the AppletContext to interface with the browser.

The applet is NOT a top-level window, so you will need to add it to one. In other words, if the applet extends Applet, then it is a Panel subclass, so add it to a java.awt.Frame. If it is a JApplet, add it to a javax.swing.JFrame. In your main (or code called by your main), you must call the methods that the browser would normally call, e.g., after construction, you would call init() and start(). On some user action, you may need to call stop() and then start() at a later point. Also check to see if it has a destroy() method. You may need to call that before closing your application.

2007-02-22 18:03:36 · answer #1 · answered by vincentgl 5 · 0 0

Applets are specialized version of java classes, so if you have well written applet, then changing it to application should be easier.

Main area where you should concentrate is flow of events during applet life-cycle. Just check what's going on while applet is getting loaded, how it is getting painted, how it reacts to various user inputs etc.

As per IDE, try eclipse, it's free & is easy to work with.

2007-02-20 22:52:18 · answer #2 · answered by kvasani 2 · 0 0

between the numerous stuff which you could use the Java language for is to make platform-self sustaining purposes. those Java documents, or JARs could be progressed so as that they could be run on abode windows, Mac, or Linux without ameliorations. they could additionally be applications up into .exe or .app formate to be what human beings anticipate to run on abode windows or Mac. Java Applets are products of Java utility that are progressed that could run in a browser. usually, an applet is a self-contained piece of utility that takes up a rectangle in a cyber web web site. JavaScript is extremely no longer an analogous factor as Java in any respect. they only have comparable names. JavaScript is often used to run interior of your cyber web browser and enables a cyber web developer to characteristic function to cyber web pages that HTML and CSS basically can no longer do. JavaScript can get entry to all the climate of the HTML and the CSS and can substitute their values.

2016-09-29 10:08:49 · answer #3 · answered by husted 4 · 0 0

tucows.com

2007-02-20 22:45:05 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers