2
import java.awt.event.*;
5
public class TestFrame extends JFrame implements ActionListener
9
Container pane = getContentPane();
10
pane.setLayout(new BorderLayout());
11
TestPanel tPanel = new TestPanel();
12
pane.add("Center", tPanel);
13
Button closeBtn = new Button("Close");
14
closeBtn.addActionListener(this);
15
Panel bottomPanel = new Panel();
16
bottomPanel.setLayout(new FlowLayout());
17
bottomPanel.add(closeBtn);
18
pane.add("South", bottomPanel);
22
public void actionPerformed(ActionEvent e)