code: public void setMaxPageSize(final int maxPageSize) {
  		if (maxPageSize <= 0) {
  			throw new IllegalArgumentException("Parameter maxPageSize must be greater than zero.");
  		}
  		if (this.maxPageSize == maxPageSize) {
  			return;
  		}
  		int oldMaxPageSize = this.maxPageSize;
  		setMaxPageSizeWithoutPageChanges(maxPageSize);
  
  		int rowCount = getRowCount();
  		if (rowCount > 0) {
  			if (maxPageSize > oldMaxPageSize) {
  				schedule(dataOffset);
  			} else if (data.size() > maxPageSize) {
  				final List<T> shrunkData = data.subList(0, maxPageSize);
  
  				EventQueue.invokeLater(new Runnable() {
  
  					@Override
  					public void run() {
  						setData(dataOffset, new ArrayList<>(shrunkData));
  					}
  				});
  			}
  		}
  
  	}
docs: Sets the maximum size of the page.
  <p>
  If the given maximum size is greater than the current maximum size a new page will be loaded, otherwise the current page
  will be shrunk to meet the given maximum size. In both cases the {@code TableModelListener} will be notified of the
  change.
  </p>
  <p>
  The call to this method has no effect if the given maximum size is equal to the current maximum size.
  </p>
  
  @param maxPageSize the new maximum page size
  @throws IllegalArgumentException if {@code maxPageSize} is negative or zero.
  @see #setMaxPageSizeWithoutPageChanges(int)
  @see TableModelListener