code: public void setMaxNoOfMajorTicks(final int MAX_NO_OF_MAJOR_TICKS) {
          if (MAX_NO_OF_MAJOR_TICKS > 20) {
              this.maxNoOfMajorTicks = 20;
          } else if (MAX_NO_OF_MAJOR_TICKS < 2) {
              this.maxNoOfMajorTicks = 2;
          } else {
              this.maxNoOfMajorTicks = MAX_NO_OF_MAJOR_TICKS;
          }
          calculate();
          fireStateChanged();
      }
docs: Sets the maximum number of major tickmarks we're comfortable with
  @param MAX_NO_OF_MAJOR_TICKS the maximum number of major tickmarks for the axis