-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.1.6, 1.2.0
-
x86
-
windows_nt
Run attached code on Window95/NT Japanese:
Both JDK1.1.6/1.2Beta4 tested.
When window appears, starting position of TextField moved to "123", instead of "abc". In other words, string is shifted beyond left edge of TextField.
This doesn't happen in case removing multi.selectAll() call on the middle of code.
-----
import java.io.*;
import java.awt.*;
import java.awt.event.*;
public class TestApp1B extends Frame implements ActionListener {
TextField multi = new TextField("abcdefg\ufffd\ufffd\ufffd\ufffd\ufffd123\ufffd\ufffd\ufffd", 50);
Button b = new Button("selectAll()");
public static void main(String args[]) {
TestApp1B ta1A = new TestApp1B();
}
public TestApp1B() {
addWindowListener(new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit(0);
}
});
b.addActionListener(this);
// It's a bug.
multi.selectAll();
setTitle("test window");
setLayout(new FlowLayout(FlowLayout.LEFT));
setSize(400, 120);
add(multi);
add(b);
setVisible(true);
}
public void actionPerformed(ActionEvent e) {
multi.selectAll();
}
}
-----
koushi.takahashi@japan 1998-06-16
Both JDK1.1.6/1.2Beta4 tested.
When window appears, starting position of TextField moved to "123", instead of "abc". In other words, string is shifted beyond left edge of TextField.
This doesn't happen in case removing multi.selectAll() call on the middle of code.
-----
import java.io.*;
import java.awt.*;
import java.awt.event.*;
public class TestApp1B extends Frame implements ActionListener {
TextField multi = new TextField("abcdefg\ufffd\ufffd\ufffd\ufffd\ufffd123\ufffd\ufffd\ufffd", 50);
Button b = new Button("selectAll()");
public static void main(String args[]) {
TestApp1B ta1A = new TestApp1B();
}
public TestApp1B() {
addWindowListener(new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit(0);
}
});
b.addActionListener(this);
// It's a bug.
multi.selectAll();
setTitle("test window");
setLayout(new FlowLayout(FlowLayout.LEFT));
setSize(400, 120);
add(multi);
add(b);
setVisible(true);
}
public void actionPerformed(ActionEvent e) {
multi.selectAll();
}
}
-----
koushi.takahashi@japan 1998-06-16
- relates to
-
JDK-4066587 TextArea/Field: selectAll can not select all entry if multibyte is used
- Closed