Java Code


 import java.awt.*;
 import javax.swing.*;
	
 public class Components extends JApplet
 {
	// declare components here
        JLabel  title;
	JTextField fullName;

   public void init( ) 
   {
        // initialize variables here
        title = new JLabel( "My Lovely Applet" );
		fullName = new JTextField( 20 );
	 
        // set the layout manager
        setLayout( new FlowLayout( )  );

        // Add the components to the applet
        add( title );
        add( fullName );
    }
 }

Back to Code Examples
©2006- by E.S.Boese. All Rights Reserved