-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
beta
-
sparc
-
solaris_2.5
Name: dsC58869 Date: 06/16/98
The method Scrollbar.setMinimum(int newMinimum) works wrong when
newMinimum is Integer.MAX_VALUE. In this case the maximun of scrollbar
will be less than minimum.
==== Here is the test demonstrating the bug ====
import java.awt.*;
public class Test{
public static void main(String[] args){
Scrollbar sb = new Scrollbar();
sb.setMinimum(Integer.MAX_VALUE);
System.out.println("MINIMUM: " + sb.getMinimum());
System.out.println("MAXIMUM: " + sb.getMaximum());
if(sb.getMaximum() < sb.getMinimum())
System.out.println("FAILED: maximum less than minimum");
System.exit(0);
}
}
==== Here is the output of the test ====
%java Test
MINIMUM: 2147483647
MAXIMUM: -2147483648
FAILED: maximum less than minimum
======================================================================
Justification:
The method sould work properly
======================================================================