@Override
    public void keyPressed(KeyEvent e) {
        int code = e.getKeyCode();
        int dx = 0;
        int dy = 0;
        if (code == KeyEvent.VK_LEFT) {
            dx = -1;
        } else if (code == KeyEvent.VK_UP) {
            dy = -1;
        } else if (code == KeyEvent.VK_RIGHT) {
            dx = 1;
        } else if (code == KeyEvent.VK_DOWN) {
            dy = 1;
        }

        if ((((dx == 0) && (dy == 0)) == false) && shiftFocus(dx, dy, (Component) e.getSource())) {
            e.consume();
        }
    }