import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class swing extends JFrame {
JButton load =new JButton("Load");
JButton save =new JButton("Save");
JButton a=new JButton("A");
public swing()// 为什么要声明这个构造方法?
{
super("EDIT PAYROLL");// super 是什么?
setSize(300,100);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//ImageIcon load=new ImageIcon("");
//JButton load =new JButton("load",);
JPanel pane =new JPanel();
pane.add(load);
pane.add(save);
pane.add(a);
add(pane);
}
public static void main(String[] arguStrings)
{
swing s=new swing();
}
}
慕斯709654
相关分类