Back to index

lightning-sunbird  0.9+nobinonly
TestFrame.java
Go to the documentation of this file.
00001 import java.awt.*;
00002 import java.awt.event.*;
00003 import javax.swing.*;
00004 
00005 public class TestFrame extends JFrame implements ActionListener 
00006 {
00007        public TestFrame()
00008        {
00009               Container pane =  getContentPane();
00010               pane.setLayout(new BorderLayout());
00011               TestPanel tPanel = new TestPanel();
00012               pane.add("Center", tPanel);
00013               Button closeBtn = new Button("Close");
00014               closeBtn.addActionListener(this);
00015               Panel bottomPanel = new Panel();
00016               bottomPanel.setLayout(new FlowLayout());
00017               bottomPanel.add(closeBtn);
00018               pane.add("South", bottomPanel);
00019               pack();
00020        }
00021 
00022        public void actionPerformed(ActionEvent e)
00023        {
00024               setVisible(false);
00025        }
00026 
00027 }