一个简单的学生信息查询系统

源代码在线查看: about.java

软件大小: 14 K
上传用户: qqpp2q
关键词: 信息查询系统
下载地址: 免注册下载 普通下载 VIP

相关代码

				//About.java 
				
				import java.awt.*; 
				import java.awt.event.*; 
				import javax.swing.*; 
				
				public class About extends JFrame { 
				    JLabel label; 
				
				    JButton button; 
				
				    // 生成一个窗口 
				    public About() { 
				        super("关于"); 
				        setSize(250, 115); 
				        setAlwaysOnTop(true); 
				        label = new JLabel(); 
				        label.setText("制作者:赵坤"); 
				        button = new JButton(); 
				        button.setText("确定"); 
				        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
				
				        button.addActionListener(new ActionListener() { 
				            public void actionPerformed(ActionEvent e) { 
				                setVisible(false); 
				            } 
				        }); 
				
				        Container con = getContentPane(); 
				        con.setLayout(null); 
				        label.setBounds(85, 10, 82, 25); 
				        button.setBounds(95, 55, 60, 25); 
				        con.add(label); 
				        con.add(button); 
				
				        // 将窗口置于屏幕中央 
				        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); 
				        Dimension frameSize = this.getSize(); 
				        if (frameSize.height > screenSize.height) { 
				            frameSize.height = screenSize.height; 
				        } 
				        if (frameSize.width > screenSize.width) { 
				            frameSize.width = screenSize.width; 
				        } 
				        setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); 
				        setResizable(false); 
				        setVisible(true); 
				    } 
				} 			

相关资源