void setMouseEntered(boolean entered) {
    if (useMouseEnterExit) {
      if (entered && !mouseEntered) {
        super.processMouseEvent(
            new MouseEvent(this, MouseEvent.MOUSE_ENTERED, System.currentTimeMillis(), 0, 0, 0, 0, false));
      }
      else if (!entered && mouseEntered) {
        super.processMouseEvent(
            new MouseEvent(this, MouseEvent.MOUSE_EXITED, System.currentTimeMillis(), 0, -1, -1, 0, false));
      }
    }
    else {
      if (!entered && mouseEntered) {
        super.processMouseMotionEvent(
            new MouseEvent(this, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, -1, -1, 0, false));
      }
    }

    mouseEntered = entered;
  }