public class Shapes
1: // Fig. 12.30: Shapes.java
2: // Demonstrating some Java 2D shapes.
3: import javax.swing.JFrame;
4:
5: public class Shapes
6: {
7: // execute application
8: public static void main( String args[] )
9: {
10: // create frame for ShapesJPanel
11: JFrame frame = new JFrame( "Drawing 2D shapes" );
12: frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
13:
14: // create ShapesJPanel
15: ShapesJPanel shapesJPanel = new ShapesJPanel();
16: frame.add( shapesJPanel ); // add shapesJPanel to frame
17: frame.setSize( 425, 200 ); // set frame size
18: frame.setVisible( true ); // display frame
19: } // end main
20: } // end class Shapes
21:
22: /**************************************************************************
23: * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
24: * Pearson Education, Inc. All Rights Reserved. *
25: * *
26: * DISCLAIMER: The authors and publisher of this book have used their *
27: * best efforts in preparing the book. These efforts include the *
28: * development, research, and testing of the theories and programs *
29: * to determine their effectiveness. The authors and publisher make *
30: * no warranty of any kind, expressed or implied, with regard to these *
31: * programs or to the documentation contained in these books. The authors *
32: * and publisher shall not be liable in any event for incidental or *
33: * consequential damages in connection with, or arising out of, the *
34: * furnishing, performance, or use of these programs. *
35: *************************************************************************/