United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4094136 : Scrollbar behaviour doesn't match description at Maximum parameter

Details
Type:
Bug
Submit Date:
1997-11-20
Status:
Closed
Updated Date:
1998-01-27
Project Name:
JDK
Resolved Date:
1998-01-27
Component:
docs
OS:
windows_95
Sub-Component:
guides
CPU:
x86
Priority:
P4
Resolution:
Duplicate
Affected Versions:
1.1.4
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description

Name: joT67522			Date: 11/19/97


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/02/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)
======================================================================

                                    

Comments
WORK AROUND



Name: joT67522			Date: 11/19/97



======================================================================
                                     
2004-06-11



Hardware and Software, Engineered to Work Together