Use ModelUtil.hasLength()

This commit is contained in:
Sergey Ponomarev 2024-08-24 14:42:12 +03:00
parent b53b814740
commit 193a9e4c42
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ public class LoginDialog {
quitLogin();
}
});
if (loginPanel.getUsername().trim().length() > 0) {
if (ModelUtil.hasLength(loginPanel.getUsername())) {
loginPanel.getPasswordField().requestFocus();
}

View File

@ -643,7 +643,7 @@ public class LoginUIPanel extends javax.swing.JPanel implements KeyListener, Act
quitLogin();
}
});
if (getUsernameField().getText().trim().length() > 0) {
if (ModelUtil.hasLength(getUsernameField().getText())) {
getPasswordField().requestFocus();
}