Back to index

lightning-sunbird  0.9+nobinonly
TestApplet.java
Go to the documentation of this file.
00001 import java.awt.event.*;
00002 import java.applet.*;
00003 import javax.swing.*;
00004 import java.awt.*;
00005 
00006 public class TestApplet extends JApplet implements ActionListener
00007 {
00008        TestFrame tFrame;
00009 
00010        public void init()
00011        {
00012               getContentPane().setLayout(new BorderLayout());
00013               TestPanel tPanel = new TestPanel();
00014               getContentPane().add("Center", tPanel);
00015 
00016               Button showBtn = new Button("Show");
00017               showBtn.addActionListener(this);
00018               Panel bottomPanel = new Panel();
00019               bottomPanel.setLayout(new FlowLayout());
00020               bottomPanel.add(showBtn);
00021               getContentPane().add("South", bottomPanel);
00022 
00023               tFrame = new TestFrame();
00024        }
00025 
00026        public void actionPerformed(ActionEvent e)
00027        {
00028               tFrame.setVisible(true);
00029 //            tFrame.dispose();
00030        }
00031 
00032 }