pjs/plugin/oji/MRJ/testing/SwingApplet/TestApplet.java

33 строки
692 B
Java
Исходник Обычный вид История

2003-06-11 09:11:59 +04:00
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.awt.*;
public class TestApplet extends JApplet implements ActionListener
{
TestFrame tFrame;
public void init()
{
getContentPane().setLayout(new BorderLayout());
TestPanel tPanel = new TestPanel();
getContentPane().add("Center", tPanel);
Button showBtn = new Button("Show");
showBtn.addActionListener(this);
Panel bottomPanel = new Panel();
bottomPanel.setLayout(new FlowLayout());
bottomPanel.add(showBtn);
getContentPane().add("South", bottomPanel);
tFrame = new TestFrame();
}
public void actionPerformed(ActionEvent e)
{
tFrame.setVisible(true);
// tFrame.dispose();
}
}