public void Email(JTextField a) {
        a.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent e) {
                char c = e.getKeyChar();
                if (Character.isLetterOrDigit(c) || c == '_' || c == '-' || c == '@' || c == '.' || c == 'ñ') {
                    
                }else{
                    getToolkit().beep();
                    e.consume();
                }
            }
        });
    }