import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Test
{
public static void main(String[] args)
{
JFrame jtfMainFrame=new JFrame("Which Button Demo");
jtfMainFrame.setSize(450, 150);
JButton jbnButton1 = new JButton("Button 1");
JPanel jplPanel = new JPanel();
jplPanel.add(jbnButton1);
jtfMainFrame.getContentPane().add(jplPanel, BorderLayout.CENTER);
jtfMainFrame.setVisible(true);
}
}
ctrl c:跳開