@Override
	public void actionPerformed(ActionEvent e) {
		if (!database.login(loginName,
				PasswordDialog.inputPassword(this, loginName))) {
			JOptionPane.showMessageDialog(this, ",йԱȨ", "ܾ",
					JOptionPane.WARNING_MESSAGE);
			dispose();
			return;
		}
		String cmd = e.getActionCommand();
		if (cmd.equals("add")) {
			String name = JOptionPane.showInputDialog(this, "Ҫӵĵ¼",
					"ӹԱ", JOptionPane.QUESTION_MESSAGE);
			String password = PasswordDialog.inputPassword(this, name);
			if (database.addAdmin(name, password))
				this.updateList();
			else
				JOptionPane.showMessageDialog(this, "ͬԱѴ", "ӹԱʧ",
						JOptionPane.WARNING_MESSAGE);
		} else if (cmd.equals("remove")) {
			String name = list.getSelectedValue();
			database.removeAdmin(name);
			this.updateList();
		} else if (cmd.equals("modify")) {
			String name = list.getSelectedValue();
			String password = PasswordDialog.inputPassword(this, name + "");
			database.removeAdmin(name);
			database.addAdmin(name, password);
		} else
			JOptionPane.showMessageDialog(this, "δ֪Ķ:" + cmd, "",
					JOptionPane.ERROR_MESSAGE);
	}