Java Code

import java.awt.*;
import javax.swing.*;
public class ToolTipExamples extends JApplet
{
	JButton submit;

	Image img;
	ImageIcon ic;
	JLabel label;
    public void init( )
    {
	setLayout( new FlowLayout( FlowLayout.LEFT) );

	submit = new JButton( "Submit" );
	submit.setToolTipText( "Click button to email your message." );

	img = getImage( getCodeBase( ), "singer.gif" );
	ic = new ImageIcon( img );
	label = new JLabel( ic );
	label.setToolTipText( "Image of me and friend" );

	add( submit );
	add( label );
    }
}

©2006 by E.S.Boese. All Rights Reserved