
import javax.swing.*;
import java.awt.*;

/**
 An applet with text using a label.
*/
public class LabelDemo extends JApplet
{
    public void init( )
    {
        Container contentPane = getContentPane( );
        contentPane.setBackground(Color.WHITE);

        //Create labels:
        JLabel label1 = new JLabel("Hello, my friend ... ");
        JLabel label2 = new JLabel("way out there!");

        //Add labels:
        contentPane.setLayout(new FlowLayout( ));
        contentPane.add(label1);
        contentPane.add(label2);
    }
}
