Instructions
- 1
Locate the Java source code file containing the applet's main method. If the applet consists of more than one file, then this is usually the one whose name is the same as the Applet itself. It will contain a "public void init()" method.
2Change the part of the class declaration that reads "extends JApplet" to "extends JFrame" for the program to run as an app instead of an application.
3Change the method declaration "public void init()" to "static public void main (String [] args)" to change the program's function from that of an applet to a regular app.
4Add the lines "import javax.swing.;" and "import java.awt.;" to the very top of the source code file.
No comments:
Post a Comment