Java Reference
In-Depth Information
LISTING 5.12
//********************************************************************
// LeftRight.java Author: Lewis/Loftus
//
// Demonstrates the use of one listener for multiple buttons.
//********************************************************************
import javax.swing.JFrame;
public class LeftRight
{
//-----------------------------------------------------------------
// Creates the main program frame.
//-----------------------------------------------------------------
public static void main (String[] args)
{
JFrame frame = new JFrame ("Left Right");
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add( new LeftRightPanel());
frame.pack();
frame.setVisible( true );
}
}
DISPLAY
Search WWH ::




Custom Search