Hello World


import java.applet.*;
import java.awt.*;

public class FirstApplet extends Applet{
  public void paint(Graphics g){
    g.drawString("Welcome in Java Applet.",40,20);

// test.html

<APPLET ALIGN="CENTER" CODE="FirstApplet.class" WIDTH="800" HEIGHT="500"></APPLET>

// test2.html

<applet MAYSCRIPT="true" height="80" width="95" name="DP4WEB" 
                archive="DP4Web.jar" code="com.blabla.DP4WEB" id="DP4WEB"> 
	<param name="a" value="1" /> 
	Java(tm) is not installed in this machine. 


Netbeans Applet

1) File > New Project (Ctrl-Shift-N). Under Categories, select Java

2) Right-click the HelloApplet project node in the Projects window and select New > Other (Ctrl-N).
	Under Categories, select Java. Under File Types, select Applet.
	Alternatively, if you want to visually design your applet, select Swing GUI Forms > JApplet Form.

3) Under Class Name, type MyApplet.

	package firstapplet2;

	import java.applet.Applet;
	import java.awt.Graphics;

	public class MyApplet extends Applet {
		public void paint(Graphics g) {
			g.drawString("Hello applet!", 50, 25);

5) Build and run project

	The MyApplet.html launcher file, with the applet embedded, is created in the build folder, 
	which you can see if you switch to the Files window.