// HelloSimpleApplet.java (c) 2006 Kari Laitinen // http://www.naturalprogramming.com/ // 2006-10-05 File created. // 2006-10-05 Latest modification. // This is a simple applet which shows a line of text which is // represented by a JLabel object. import java.awt.* ; import javax.swing.* ; public class HelloSimpleApplet extends JApplet { JLabel text_in_window = new JLabel( "Hello. I am a simple Java applet.", JLabel.CENTER ) ; public void init() { add( text_in_window ) ; } } /** A shorter equivalent version of this program would be the following: public class HelloSimpleApplet extends JApplet { public void init() { add( new JLabel( "Hello. I am a simple Java applet.", JLabel.CENTER ) ) ; } } **/