// LabelsDemo.java
// Demos basics of JLabels
// APPLET CODE="LabelsDemo" HEIGHT=400 WIDTH=230
import java.awt.*;
import javax.swing.*;

public class LabelsDemo extends JApplet {
	Container c;
	JLabel lFirst, lSecond, lThird;
	
	public void init( ) {
		c = getContentPane( );
		c.setLayout( new FlowLayout( ) );
		lFirst = new JLabel( "The first label" );
		c.add( lFirst );

		Icon javaIcon = new ImageIcon( "java.gif" );
		lSecond = new JLabel( "The Java label", javaIcon, SwingConstants.CENTER );
		c.add( lSecond );

		Icon dangerIcon = new ImageIcon( "danger.gif" );
		lThird = new JLabel( "This is the danger label", dangerIcon, SwingConstants.RIGHT );
		lThird.setVerticalTextPosition( SwingConstants.BOTTOM );
		lThird.setHorizontalTextPosition( SwingConstants.CENTER );
		lThird.setToolTipText( "This is some tool tip text!!!!!!!!!" );
		c.add( lThird );
	}
}