1 |
import javax.swing.JButton; |
2 |
import javax.swing.JFrame; |
3 |
import javax.swing.JLabel; |
4 |
import javax.swing.JPanel; |
5 |
import javax.swing.JTextField; |
6 |
|
7 |
/** |
8 |
This program displays a frame containing a RectanglePanel. |
9 |
*/ |
10 |
public class RectangleTest |
11 |
{ |
12 |
public static void main(String[] args) |
13 |
{ |
14 |
RectanglePanel rectPanel = new RectanglePanel(); |
15 |
|
16 |
JFrame appFrame = new JFrame(); |
17 |
appFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
18 |
appFrame.setContentPane(rectPanel); |
19 |
appFrame.pack(); |
20 |
appFrame.show(); |
21 |
} |
22 |
} |