-
Bug
-
Resolution: Fixed
-
P4
-
1.1.5
-
swing1.0fcs
-
x86
-
windows_nt
Name: dgC58589 Date: 01/05/98
In swing-0.6.1, when using a JTextField and
the text is longer than the field width, you can
scroll the text left and right using the arrows
keys. However, when setting the textfield to
non-editable using 'setEditable(false)', not only
the text edit feature gets disabled as expected, but in addition scrolling doesn't work anymore.
import com.sun.java.swing.*;
import com.sun.java.swing.text.*;
import java.awt.*;
import com.sun.java.swing.*;
import com.sun.java.swing.text.*;
import java.awt.*;
public class Foo {
public static
void main(String args[]) {
JTextField fld;
Frame f = new Frame();
f.setLayout(new BorderLayout());
f.add( fld = new JTextField("Hello World ! This is a really long text"), "West" );
fld.setEditable( false );
f.setSize(100, 50);
f.show();
}
}
(Review ID: 22321)
======================================================================