package studentsystem;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.Rectangle;
import java.awt.Font;
import javax.swing.BorderFactory;
public class StuSystemFrame extends JFrame {
ImageIcon img1;
ImageIcon img2 = new ImageIcon("add.jpg");
ImageIcon img8 = new ImageIcon("openFile.gif");
ImageIcon img3 = new ImageIcon("xiugai.gif");
ImageIcon img4 = new ImageIcon("chazhao.gif");
ImageIcon img5 = new ImageIcon("shanchu.jpg");
ImageIcon img6 = new ImageIcon("closeFile.gif");
ImageIcon img7 = new ImageIcon("help.gif");
ImageIcon img9 = new ImageIcon("caidan.gif");
ImageIcon img10 = new ImageIcon("about.gif");
JPanel contentPane;
JMenuBar jMenuBar1 = new JMenuBar();
JMenu jMenu1 = new JMenu();
JMenuItem jMenuItem1 = new JMenuItem();
JMenuItem jMenuItem3 = new JMenuItem();
JMenuItem jMenuItem4 = new JMenuItem();
JMenuItem jMenuItem5 = new JMenuItem();
JMenuItem jMenuItem6 = new JMenuItem();
JMenu jMenu2 = new JMenu();
JMenuItem jMenuItem7 = new JMenuItem();
JPanel jPanel1 = new JPanel();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JPanel jPanel2;
JMenuItem jMenuItem2 = new JMenuItem();
public StuSystemFrame() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setResizable(false);
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
img1 = new ImageIcon("pingbo.jpg");
jPanel2 = new JPanel() {
public void paintComponent(Graphics g) {
g.drawImage(img1.getImage(), 0, 0, null);
super.paintComponent(g);
}
};
contentPane = (JPanel) getContentPane();
contentPane.setLayout(null);
this.setJMenuBar(jMenuBar1);
setSize(new Dimension(400, 300));
setTitle("学生成绩管理系统");
jMenu1.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenu1.setForeground(Color.blue);
jMenu1.setIcon(img9);
jMenu1.setText("菜单");
jMenuItem1.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenuItem1.setForeground(Color.blue);
jMenuItem1.setIcon(img2);
jMenuItem1.setText("添加学生信息");
jMenuItem1.addActionListener(new StuSystemFrame_jMenuItem1_actionAdapter(this));
jMenuItem3.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenuItem3.setForeground(Color.blue);
jMenuItem3.setIcon(img3);
jMenuItem3.setText("修改学生信息");
jMenuItem3.addActionListener(new StuSystemFrame_jMenuItem3_actionAdapter(this));
jMenuItem4.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenuItem4.setForeground(Color.blue);
jMenuItem4.setIcon(img5);
jMenuItem4.setText("删除学生信息");
jMenuItem4.addActionListener(new StuSystemFrame_jMenuItem4_actionAdapter(this));
jMenuItem5.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenuItem5.setForeground(Color.blue);
jMenuItem5.setIcon(img8);
jMenuItem5.setText("浏览所有学生信息");
jMenuItem5.addActionListener(new StuSystemFrame_jMenuItem5_actionAdapter(this));
jMenuItem6.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenuItem6.setForeground(Color.blue);
jMenuItem6.setIcon(img6);
jMenuItem6.setText("退出");
jMenuItem6.addActionListener(new StuSystemFrame_jMenuItem6_actionAdapter(this));
jMenu2.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenu2.setForeground(Color.blue);
jMenu2.setIcon(img7);
jMenu2.setText("帮助");
jMenuItem7.setFont(new java.awt.Font("新宋体", Font.PLAIN, 13));
jMenuItem7.setForeground(Color.blue);
jMenuItem7.setIcon(img10);
jMenuItem7.setText("关于我们");
jMenuItem7.addActionListener(new StuSystemFrame_jMenuItem7_actionAdapter(this));
jPanel1.setBounds(new Rectangle(1, 1, 10, 10));
jLabel1.setFont(new java.awt.Font("新宋体", Font.BOLD, 16));
jLabel1.setForeground(Color.red);
jLabel1.setText("3班学生成绩管理系统");
jLabel1.setBounds(new Rectangle(214, 69, 200, 200));
jLabel2.setFont(new java.awt.Font("新宋体", Font.BOLD, 15));
jLabel2.setForeground(Color.red);
jLabel2.setBounds(new Rectangle(17, 228, 129, 20));
jPanel2.setBorder(BorderFactory.createEtchedBorder());
jPanel2.setOpaque(false);
jPanel2.setBounds(new Rectangle(-6, 0, 407, 319));
jPanel2.setLayout(null);
jMenuItem2.setFont(new java.awt.Font("新宋体", Font.PLAIN, 12));
jMenuItem2.setForeground(Color.blue);
jMenuItem2.setIcon(img4);
jMenuItem2.setText("查询学生信息");
jMenuItem2.addActionListener(new StuSystemFrame_jMenuItem2_actionAdapter(this));
jMenuBar1.add(jMenu1);
jMenuBar1.add(jMenu2);
jMenu1.addSeparator();
jMenu1.add(jMenuItem1);
jMenu1.add(jMenuItem2);
jMenu1.add(jMenuItem3);
jMenu1.add(jMenuItem4);
jMenu1.add(jMenuItem5);
jMenu1.add(jMenuItem6);
jMenu2.addSeparator();
jMenu2.add(jMenuItem7);
jPanel2.add(jLabel2);
jPanel2.add(jLabel1);
contentPane.add(jPanel2);
}
public void jMenuItem1_actionPerformed(ActionEvent e) {
InsertStu insert = new InsertStu();
}
public void jMenuItem5_actionPerformed(ActionEvent e) {
DisplayAllStudent display = new DisplayAllStudent();
}
public void jMenuItem3_actionPerformed(ActionEvent e) {
UpdateStu update = new UpdateStu();
}
public void jMenuItem7_actionPerformed(ActionEvent e) {
new AboutUs();
}
public void jMenuItem2_actionPerformed(ActionEvent e) {
SearchOneStudent search = new SearchOneStudent();
search.setSize(400, 300);
search.setLocation(300, 300);
search.setVisible(true);
search.setResizable(false);
}
public void jMenuItem6_actionPerformed(ActionEvent e) {
System.exit(0);
}
public void jMenuItem4_actionPerformed(ActionEvent e) {
DeleteStu delete = new DeleteStu();
delete.setSize(400, 300);
int width = Toolkit.getDefaultToolkit().getScreenSize().width;
int height = Toolkit.getDefaultToolkit().getScreenSize().height;
delete.setLocation((width - 400) / 2, (height - 300) / 2);
delete.setVisible(true);
delete.setResizable(false);
}
}
class StuSystemFrame_jMenuItem4_actionAdapter implements ActionListener {
private StuSystemFrame adaptee;
StuSystemFrame_jMenuItem4_actionAdapter(StuSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem4_actionPerformed(e);
}
}
class StuSystemFrame_jMenuItem6_actionAdapter implements ActionListener {
private StuSystemFrame adaptee;
StuSystemFrame_jMenuItem6_actionAdapter(StuSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem6_actionPerformed(e);
}
}
class StuSystemFrame_jMenuItem2_actionAdapter implements ActionListener {
private StuSystemFrame adaptee;
StuSystemFrame_jMenuItem2_actionAdapter(StuSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem2_actionPerformed(e);
}
}
class StuSystemFrame_jMenuItem7_actionAdapter implements ActionListener {
private StuSystemFrame adaptee;
StuSystemFrame_jMenuItem7_actionAdapter(StuSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem7_actionPerformed(e);
}
}
class StuSystemFrame_jMenuItem3_actionAdapter implements ActionListener {
private StuSystemFrame adaptee;
StuSystemFrame_jMenuItem3_actionAdapter(StuSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem3_actionPerformed(e);
}
}
class StuSystemFrame_jMenuItem5_actionAdapter implements ActionListener {
private StuSystemFrame adaptee;
StuSystemFrame_jMenuItem5_actionAdapter(StuSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录




























































共 50 条
- 1


















ycl_class
- 粉丝: 8
- 资源: 15
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


安全验证
文档复制为VIP权益,开通VIP直接复制

评论3