-
Bug
-
Resolution: Fixed
-
P4
-
1.1.6
-
1.1.8
-
x86
-
windows_nt
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2019451 | 1.2.2 | Prs Prs | P4 | Resolved | Fixed | 1.2.2 |
Name: chT40241 Date: 03/11/98
Problem: TextField scrolls selected text out of view although the
TextField is wide enough to display all text. This problem occurs only if the text is selected. In addition, the problem appears to be related to the length of the text with a text length of 13 or greater causing a problem.
Compile and run this code to see that the text is scrolled such that "fghijklmnop" is displayed and highlighted instead of the whole text string as happens on the Microsoft VM.
import java.awt.*;
import java.awt.event.*;
public class TestTextField implements WindowListener {
Frame fr = new Frame("TestTextField");
public TestTextField() {
fr.setSize(300,300);
TextField tf = new TextField("", 35);
fr.add(tf, "Center");
String s = "abcdefghijklmnop";
tf.setText(s);
//tf.select(0, s.length());
fr.addWindowListener(this);
fr.setVisible(true);
}
public void windowOpened(WindowEvent e) {}
public void windowClosing(WindowEvent e) {
fr.dispose();
}
public void windowClosed(WindowEvent e) {
System.exit(0);
}
public void windowIconified(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowActivated(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
public static void main(String[] args) {
new TestTextField();
}
}
======================================================================
- backported by
-
JDK-2019451 Selected text scrolls text out of view even if there is enough room
- Resolved
- relates to
-
JDK-6475287 Scroll bar in TextArea doesn't move when texts in the text area is selected & moved downwards.
- Closed
-
JDK-6480547 REG: bug 4118621 which got Integrated in 1.1.8 fails in mustang from b25 onwards.
- Closed