@Override
  public void keyPressed(KeyEvent e) {
    if (!isEnabled())
      return;
    int id = getFocusedIndex();
    int row = id / 7;
    int col = id % 7;
    if (e.getKeyCode() == KeyEvent.VK_DOWN) {
      row++;
      if (row < 6) {
        setFocusedByIndex(row * 7 + col);
      }
    }
    if (e.getKeyCode() == KeyEvent.VK_UP) {
      row--;
      if (row >= 0) {
        setFocusedByIndex(row * 7 + col);
      }
    }
    if (e.getKeyCode() == KeyEvent.VK_LEFT) {
      col--;
      if (col >= 0) {
        setFocusedByIndex(row * 7 + col);
      }
    }
    if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
      col++;
      if (col < 7) {
        setFocusedByIndex(row * 7 + col);
      }
    }
  }
@Override
  public void keyPressed(KeyEvent e)