@Override
    public void keyPressed(KeyEvent e) {
      if (e.getModifiers() == 0 && e.getKeyCode() == KeyEvent.VK_SPACE) {
        setPressedByKeyboard(true);
        repaintComponent();
      }
    }
@Override
    public void keyPressed(KeyEvent e)