Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text_root_username = new JTextField();
- text_root_username.addKeyListener(this);//////
- text_root_password = new JPasswordField();
- text_root_password.addKeyListener(this);
- @Override
- public void keyTyped(KeyEvent e) {
- if(text_root_password.getText().length()>=8){
- e.consume();
- }
- if(text_root_username.getText().length()>=8) {
- e.consume();
- }
- }
Add Comment
Please, Sign In to add comment