code: @Override
      public int getBaseline(int width, int height) {
          if (timeTextField.isVisible()) {
              return timeTextField.getBaseline(width, height);
          }
          return super.getBaseline(width, height);
      }
docs: getBaseline, This returns the baseline value of the timeTextField.