public ProgressBar maxHint(long n) {
        if (n < 0)
            progress.setAsIndefinite();
        else {
            progress.setAsDefinite();
            progress.maxHint(n);
        }
        return this;
    }
public ProgressBar maxHint ( long n ) { if ( n < 0 ) progress . setAsIndefinite ( ) ; else { progress . setAsDefinite ( ) ; progress . maxHint ( n ) ; } return this ; }
Gives a hint to the maximum value of the progress bar.
@param n Hint of the maximum value