public void log(){
		String name = textField.getText();
		char[] passwords = passwordField.getPassword();
		String password = String.valueOf(passwords);
		UserinfoService us = new UserinfoService();
		Userinfo u = us.getUserinfo(name);
		if(u!=null){
			if(u.getPassword().equals(password)){
				Constants.user = u;
				Login.this.dispose();
				EventQueue.invokeLater(new Runnable() {
					public void run() {
						try {
							Main frame = new Main();
							frame.setVisible(true);
						} catch (Exception e) {
							e.printStackTrace();
						}
					}
				});
				
			}else{
				JOptionPane.showMessageDialog(null, "密码错误", "提示", JOptionPane.INFORMATION_MESSAGE);
				return ;
			}
		}else{
			JOptionPane.showMessageDialog(null, "用户名不存在!", "提示", JOptionPane.INFORMATION_MESSAGE);
			return ;
		}
	}