@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getSource() == jtfUserName || e.getSource() == jpfPassword
				|| e.getSource() == ensure) {
			if (jtfUserName.getText().equals("")
					|| jpfPassword.getPassword().length == 0) {
				JOptionPane.showMessageDialog(null, "请输入用户名密码！", "提示",
						JOptionPane.ERROR_MESSAGE);

			} else if (AccountDao.instance().check(jtfUserName.getText(),
					String.valueOf(jpfPassword.getPassword()))) {
				 LoginFrame.instance().setVisible(false);
				 MainFrame.instance().open();
			} else {
				JOptionPane.showMessageDialog(null, "用户名或密码错误！", "提示",
						JOptionPane.ERROR_MESSAGE);
			}
		} else if (e.getSource() == cancel) {
			 System.exit(0);
		}
	}