Encyclopedia > How to write a Java applet

  Article Content

How to write a Java applet

Writing a Java applet? This is what you need to do.

  • Download and install the Java Development Kit (http://java.sun.com/j2se/) for your operating system.
  • Write and compile a class (or set of classes) that extends java.applet.JApplet
  • Write an HTML file that has an <applet code="[your classes's name].class" height="[height]" width="[width]"></applet> tag in it.
  • Use "appletviewer [your html document's name]" to view the file. appletviewer is one of the executables included in the Java Development Kit. Or, if you want to, you can use any other Java-compatable web browser (almost all modern browsers) and enter the html document.

There is a lot more information about writing applets in Sun Microsystem's documentation (http://java.sun.com/docs/books/tutorial/applet/index) on this topic.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
East Marion, New York

... 100 females age 18 and over, there are 90.1 males. The median income for a household in the town is $44,583, and the median income for a family is $52,500. Males have a ...

 
 
 
This page was created in 29.8 ms