一个小型的图书管理系统
源代码在线查看: 复件 xinxi.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Xinxi{
JFrame frame;
JLabel label1,label2;
JButton backbutton;
public static void main(String args[]){
Xinxi xx=new Xinxi();
xx.go();
}
public void go(){
label1=new JLabel("版权:彭锦超");
label2=new JLabel("创作时间:2008,7");
frame=new JFrame("系统信息");
Container xxcontentpane=frame.getContentPane();
backbutton=new JButton("返回");
backbutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Zhujiemian zjm=new Zhujiemian();
zjm.go();
frame.setVisible(false);
}
});
JPanel p1=new JPanel();
p1.setLayout(new GridLayout(2,1));
p1.add(label1);
p1.add(label2);
xxcontentpane.add(p1,BorderLayout.NORTH);
xxcontentpane.add(backbutton,BorderLayout.SOUTH);
frame.setSize(500,450);
frame.setVisible(true);
}
}