Create a simple swing applet
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import javax.swing.*;
/*
<applet code="sw" height=300 width=300>
</applet>
*/
public class sw extends JApplet
{
JLabel l1;
Container c;
public void init()
{
c=this.getContentPane();
l1=new JLabel("this is label");
c.add(l1);
}
}