public MainFrame() {
		// TODO Auto-generated constructor stub
		this.setTitle("ѧϢϵͳ");
		this.setSize(900, 600);
		/*setLocationRelativeTo(getOwner());	*/	//ʹFrameھʾ
		
		//ʼ
		pNorth = new Panel();
		pNorth.setLayout(new BorderLayout());
		pNorthTop = new Panel();
		pNorthBottom = new Panel();
		pSouth = new Panel();
		//˵(ú)
		buildMenu();
		//(ú)
		buildToolBar();
		pNorth.add(pNorthTop,BorderLayout.NORTH);
		
		//ϲ²ѯ
		queryLabel = new Label("");
		queryTextField = new TextField(20);
		queryButton = new Button("ѯ");
		
		//ΪqueryButton
		queryButton.addActionListener(this);
		
		pNorthBottom.add(queryLabel);
		pNorthBottom.add(queryTextField);
		pNorthBottom.add(queryButton);
		
		pNorth.add(pNorthBottom,BorderLayout.SOUTH);
		this.add(pNorth,BorderLayout.NORTH);
		//вı
		model = new StudentBiz();
		String sql = "select * from tb_student where 0=?";
		String[] params = new String[] {"0"};
		model.queryStudent(sql, params);	//ѯݷģ
		jTableInfo = new JTable(model);		//ģͷ뵽
		jTableInfo.setRowHeight(25);
		jScrollPane = new JScrollPane(jTableInfo);
		this.add(jScrollPane, BorderLayout.CENTER);
		
		
		

/*		SinPanel sinPanel = new SinPanel();
		this.add(sinPanel, BorderLayout.CENTER);*/
		
		
		//ײӡ޸ġɾؼӵ
		addButton = new Button("");
		updateButton = new Button("޸");
		deleteButton = new Button("ɾ");
		//Ӽ
		addButton.addActionListener(this);
		updateButton.addActionListener(this);
		deleteButton.addActionListener(this);
		
		pSouth.add(addButton);
		pSouth.add(updateButton);
		pSouth.add(deleteButton);
				
		this.add(pSouth,BorderLayout.SOUTH);
		
		//ҳ
		Toolkit toolkit = Toolkit.getDefaultToolkit();
		Dimension screenSize = toolkit.getScreenSize();		//ȡʾĴС1280*1024
		//ʹFrameĻʾ
		this.setLocation((screenSize.width - this.getWidth()) / 2,
				(screenSize.height - this.getHeight()) / 2);
		
		this.addWindowListener(new WindowListener() {
			
			@Override
			public void windowOpened(WindowEvent arg0) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowIconified(WindowEvent arg0) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowDeiconified(WindowEvent arg0) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowDeactivated(WindowEvent arg0) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			//
			public void windowClosing(WindowEvent frame) {	//ע
				// TODO Auto-generated method stub
				frame.getWindow().setVisible(false);	//Ϊ
				((Frame)frame.getComponent()).dispose();//ͷԴ
				System.exit(0);							//˳
			}
			
			@Override
			public void windowClosed(WindowEvent arg0) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void windowActivated(WindowEvent arg0) {
				// TODO Auto-generated method stub
				
			}
		});
		
		this.setVisible(true);
	}