Java Code

/** Example showing use of JButton
  * @author : E.S.Boese (c) Fall 2005
  */ 
import javax.swing.*;	
import java.awt.*;

public class JButtonEx extends JApplet
{
   JButton one;
   JButton two; 
   JButton three; 

   public void init( )
   {
	setLayout( new FlowLayout( ) );

	one = new JButton( "one" );
	two = new JButton( "two" ); 
	three = new JButton( "three" );
	add( one );
	add( two );
	add( three );
   }
}

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