-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 1.4.2
-
beta
-
generic, x86
-
generic, windows_2000
Name: dm26566 Date: 04/21/2003
When you invoke setEditable(false) on a Swing text
component such as JTextArea, the cursor gets set to
DEFAULT_CURSOR (instead of null). I noticed this
when I set the cursor on the parent -- it wasn't
inherited by the text component.
Some further comments:
That code is a little weird in other respects too. What
if the developer calls setCursor on the JTextField and
then setEditable. It's going to clobber their cursor.
This stuff should be fixed, and I think it should also
be moved into BasicTextUI. There, it can be handled on
the "editable" property change notification, and we can
use UIResource to appropriately tag the cursor (like we
do with colors, fonts, etc... to stop from clobbering
what the user sets).
======================================================================
###@###.### 10/13/04 17:57 GMT
When you invoke setEditable(false) on a Swing text
component such as JTextArea, the cursor gets set to
DEFAULT_CURSOR (instead of null). I noticed this
when I set the cursor on the parent -- it wasn't
inherited by the text component.
Some further comments:
That code is a little weird in other respects too. What
if the developer calls setCursor on the JTextField and
then setEditable. It's going to clobber their cursor.
This stuff should be fixed, and I think it should also
be moved into BasicTextUI. There, it can be handled on
the "editable" property change notification, and we can
use UIResource to appropriately tag the cursor (like we
do with colors, fonts, etc... to stop from clobbering
what the user sets).
======================================================================
###@###.### 10/13/04 17:57 GMT
- duplicates
-
JDK-4994238 JTextComponents Drop Cursor and Color on setEditable(false)
-
- Closed
-
- relates to
-
JDK-6263726 REGRESSION: BasicTextUI.installUI() sets wrong cursor on non-editable text components
-
- Resolved
-
-
JDK-6308993 javax.swing.plaf.basic.BasicTextUI calls editor.getCursor() very early
-
- Resolved
-