-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.1
-
x86
-
windows_95
Name: mc57594 Date: 01/28/97
When a scrollbar is double(or more)clicked weird things
happen. The click can occure anywhere in the scrollbar
(the arrow boxes, the tab etc...). Sometimes it scrolls all
the way to the end and then back. Try out the source code.
import java.awt.*;
import java.awt.event.*;
public class test extends Frame implements AdjustmentListener {
public static void main(String argv[]) {
test t = new test();
t.pack();
t.show();
}
Scrollbar sb;
TextField tf;
public test() {
sb = new Scrollbar(Scrollbar.HORIZONTAL,0,10,0,100);
add("North",sb);
tf = new TextField(10);
add("South",tf);
tf.setEditable(false);
sb.addAdjustmentListener(this);
}
public void adjustmentValueChanged(AdjustmentEvent evt) {
tf.setText(String.valueOf(evt.getValue()));
}
}
======================================================================
[sherig 03/10/97] Another user having a double click problem with
scrollbars. When testing both the following and above samples on Solaris, I don't see a problem.
Double click to advance the scroll bar to the cursor's position, and the slider will follow the cursor even after it reaches the cursor.
Description: Double click to advance the scroll bar to the cursor's position, and
the slider will follow the cursor even after it reaches the cursor.
Source code follows:
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class ScrollTest extends Frame implements AdjustmentListener
{
public ScrollTest()
{
setTitle("ScrollTest");
add("East", vert = new Scrollbar(Scrollbar.VERTICAL));
vert.addAdjustmentListener(this);
}
public boolean handleEvent(Event evt)
{
if (evt.id == Event.WINDOW_DESTROY)
System.exit(0);
return super.handleEvent(evt);
}
public void adjustmentValueChanged(AdjustmentEvent evt)
{
switch (evt.getAdjustmentType())
{
case AdjustmentEvent.UNIT_DECREMENT:
case AdjustmentEvent.UNIT_INCREMENT:
case AdjustmentEvent.BLOCK_DECREMENT:
case AdjustmentEvent.BLOCK_INCREMENT:
case AdjustmentEvent.TRACK:
System.out.println("Current scrollbar value: " + vert.getValue());
}
}
public static void main(String args[])
{
Frame f = new ScrollTest();
f.resize(200, 400);
f.show();
}
private Scrollbar vert;
}
company - Canada Trust
======================================================================
[sherig 1997-06-19] A user has passed along the following information to
the java bug alias:
BUG ID 4028490 is not an java bug. It is a known Windows bug!
It has been in windows since version 3.1 (and problaby before!)
- duplicates
-
JDK-4028516 scrollbars get stuck down (moving themselves)
-
- Closed
-
-
JDK-4063785 Scrollbar does not advance under 1.1.3
-
- Closed
-