从get usertype字符串错误java导出页面

时间:2013-12-03 09:07:56

标签: java

我的程序已经有了这个:

enter image description here

该框表示我已登录为“Admin - Administrator”,请注意“Admin是存储在数据库中的用户名”和“Administrator是存储在数据库中的usertype”

这是我的代码,显示“管理员 - 管理员”:

user = result.getString("Username");
userType = result.getString("UserType");

_userInformation.setUser(user);
_userInformation.setUserType(userType);

_infoBox.ShowMessageBox("Welcome \n You Have Logged in as : \n" + _userInformation.getUser() + " - " + _userInformation.getUserType() + " ! ", "Welcome" , 1);

然而,当我试图根据usertype指向页面时,它没有给我任何东西(页面没有指示或程序停在上面显示的图像),这是我的代码,用户点击后该消息框中的确定按钮:

if (_userInformation.getUserType() == "Administrator")
{
    this.dispose();

    _adminChoices.setVisible(true);
}

当我跟踪_userInformation.getUserType()时,它给了我这个:

enter image description here

你能帮助我吗?谢谢!

0 个答案:

没有答案