package ManageStudent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.SQLException;
/**
* 系统主页面的操作
*/
public class mySystemJFrame extends JFrame implements ActionListener {
//显示如下功能菜单:输入数据、删除信息、修改信息、查询信息;
private JComboBox insert,delete,update,search;
private int section; //用于功能标识
private JTable jtable;//用于做查询结果的表格
private Font x = new Font("宋体",Font.BOLD,20); //文本字体
public mySystemJFrame(){
super("学生管理系统");
Dimension dim = getToolkit().getScreenSize(); // 获得屏幕分辨率
this.setBounds(dim.width/10,dim.height/10,dim.width *3/ 5, dim.height *3/ 5); // 窗口居中
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
ImageIcon background = new ImageIcon("ManageStudent\\images\\2.png");
JLabel label = new JLabel(background);
label.setBounds(0, 0, this.getWidth(), this.getHeight());
JPanel imagePanel = (JPanel) this.getContentPane();
imagePanel.setOpaque(false);
this.getLayeredPane().add(label, new Integer(Integer.MIN_VALUE));
JMenuBar menubar=new JMenuBar(); //菜单栏
this.setJMenuBar(menubar); //框架上添加菜单栏
String menustr[]={"输入数据","删除信息","修改信息","查询信息"};
JMenu menu[]=new JMenu[menustr.length];
for (int i=0;i