mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-16 12:30:13 +01:00
28 lines
607 B
Java
28 lines
607 B
Java
|
import java.awt.*;
|
||
|
import java.awt.event.*;
|
||
|
import javax.swing.*;
|
||
|
|
||
|
public class TestFrame extends JFrame implements ActionListener
|
||
|
{
|
||
|
public TestFrame()
|
||
|
{
|
||
|
Container pane = getContentPane();
|
||
|
pane.setLayout(new BorderLayout());
|
||
|
TestPanel tPanel = new TestPanel();
|
||
|
pane.add("Center", tPanel);
|
||
|
Button closeBtn = new Button("Close");
|
||
|
closeBtn.addActionListener(this);
|
||
|
Panel bottomPanel = new Panel();
|
||
|
bottomPanel.setLayout(new FlowLayout());
|
||
|
bottomPanel.add(closeBtn);
|
||
|
pane.add("South", bottomPanel);
|
||
|
pack();
|
||
|
}
|
||
|
|
||
|
public void actionPerformed(ActionEvent e)
|
||
|
{
|
||
|
setVisible(false);
|
||
|
}
|
||
|
|
||
|
}
|