public void keyTyped(KeyEvent e) {
            JTextField source = (JTextField) e.getSource();
            if (e.getKeyChar() == separator) {
                e.setKeyChar('\0');
                if (!source.getText().isEmpty()) {
                    transferFocus();
                }
            }
            if (source.getText().isEmpty() && e.getKeyChar() == KeyEvent.VK_BACK_SPACE) {
                transferFocusBackward();
            }
            switch (version) {
                case IPV4:
                    if (!Character.isDigit(e.getKeyChar())) {
                        e.setKeyChar('\0');
                    }
                    break;
                case IPV6:
                    try {
                        Integer.parseInt(String.valueOf(e.getKeyChar()), 16);
                    } catch (Exception ex) {
                        e.setKeyChar('\0');
                    }
                    break;
            }
        }