Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4094136
Votes 3
Synopsis Scrollbar behaviour doesn't match description at Maximum parameter
Category guides:none
Reported Against 1.1.4
Release Fixed
State 11-Closed, duplicate of 4070498, bug
Priority: 4-Low
Related Bugs 4070498
Submit Date 20-NOV-1997
Description




1) Steps:
Just create a scrollbar. E.g.:
new Scrollbar(Scrollbar.HORIZONTAL, 1, 5, 0, 10);
The Maximum isn't the highest Value ! The
highest value is 15 (= 5 + 10)
so there are 10 steps for scrolling...

It works in Netscape Navigator however...
i can't believe...!!!

2) Source:
/*
 * @(#)ScrollTest.java	0.00 97/11/03 Oliver Rode
 * 
 * Copyright (c) 1997 Oliver Rode. All Rights Reserved.
 *
 * CopyrightVersion 1.0
 * 
 */

package forum;

import java.applet.*;
import java.awt.*;
import java.util.*;

/**
 * Main class of this package.
 *
 * @version 1.0 NOV/ customer /1997
 * @author Oliver Rode
 */
public class ScrollTest extends Applet
{
  public ScrollTest ()
  {
  }

  public void init()
  {
	BorderLayout b = new BorderLayout();
	setLayout(b);

	Scrollbar ranger = new Scrollbar(Scrollbar.HORIZONTAL, 1, 5, 0, 10);
	ranger.setLineIncrement(1);
	ranger.setPageIncrement(2);
	add("North", ranger);
  }

  public static void main (String argc[])
  {
	Frame f = new Frame();
	f.resize(640,500);
	ScrollTest o = new ScrollTest();
	f.add(o);
	f.show();
	o.init();
	o.start();
	f.validate();
  }
}


Regards,
Oliver
(Review ID: 19972)
======================================================================
Work Around





======================================================================
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang