-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
None
-
beta2
-
x86
-
windows_nt
The following test demonstrates two problems with wheel scrolling of TextAreas under Win32:
* Frame1 has both scrollbars enabled, but text such that only the horizontal scrollbar is necessary. The mouse wheel should scroll the text horizontally, but does nothing.
* Frame 2 only has the horizontal scrollbar enabled. Again, the mouse wheel should scroll the text horizontally, but it actually scrolls diagonally - BOTH HORIZONTALLY AND VERTICALLY.
Both of these behaviors are clearly wrong, and easily reproducible. They could be bugs in Windows itself. I don't believe these problem exist with Linux mousewheel.
import java.awt.*;
public class HorizTextAreaScroll {
public static void main(String[] args) {
Frame f = new Frame("Frame 1 - both");
TextArea ta = new TextArea();
ta.append("A very, very, very, very, very, very, very, very, very, very, very, very, very, long line of text\n");
ta.append("Another very, very, very, very, very, very, very, very, very, very, very, very, very, long line of text\n");
f.add(ta);
f.setSize(200, 200);
f.show();
Frame f2 = new Frame("Frame 2 - horizontal only");
TextArea ta2 = new TextArea("", 0, 0, TextArea.SCROLLBARS_HORIZONTAL_ONLY);
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 50; j++) {
ta2.append("" + i + "");
}
ta2.append("\n");
}
f2.add(ta2);
f2.setSize(225, 225);
f2.setLocation(100, 100);
f2.show();
}
}
* Frame1 has both scrollbars enabled, but text such that only the horizontal scrollbar is necessary. The mouse wheel should scroll the text horizontally, but does nothing.
* Frame 2 only has the horizontal scrollbar enabled. Again, the mouse wheel should scroll the text horizontally, but it actually scrolls diagonally - BOTH HORIZONTALLY AND VERTICALLY.
Both of these behaviors are clearly wrong, and easily reproducible. They could be bugs in Windows itself. I don't believe these problem exist with Linux mousewheel.
import java.awt.*;
public class HorizTextAreaScroll {
public static void main(String[] args) {
Frame f = new Frame("Frame 1 - both");
TextArea ta = new TextArea();
ta.append("A very, very, very, very, very, very, very, very, very, very, very, very, very, long line of text\n");
ta.append("Another very, very, very, very, very, very, very, very, very, very, very, very, very, long line of text\n");
f.add(ta);
f.setSize(200, 200);
f.show();
Frame f2 = new Frame("Frame 2 - horizontal only");
TextArea ta2 = new TextArea("", 0, 0, TextArea.SCROLLBARS_HORIZONTAL_ONLY);
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 50; j++) {
ta2.append("" + i + "");
}
ta2.append("\n");
}
f2.add(ta2);
f2.setSize(225, 225);
f2.setLocation(100, 100);
f2.show();
}
}
- relates to
-
JDK-4417236 Wheel scrolling of TextAreas broken as of Merlin beta b43 on Windows 98
-
- Resolved
-