diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | javax/swing/plaf/basic/BasicTextFieldUI.java | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,12 @@ 2005-11-14 Roman Kennke <kennke@aicas.com> + * javax/swing/plaf/basic/BasicTextFieldUI.java + (propertyChange): Get new value from the PropertyChangeEvent and + not from the component itself (since when it receives the event, + the component still has the old state). + +2005-11-14 Roman Kennke <kennke@aicas.com> + * javax/swing/plaf/basic/BasicTextUI.java (uninstallListeners): Uninstall the document listener here. (getVisibleEditorRect): Fetch the textComponent via getComponent(). diff --git a/javax/swing/plaf/basic/BasicTextFieldUI.java b/javax/swing/plaf/basic/BasicTextFieldUI.java index e1422c438..4e2ca9f93 100644 --- a/javax/swing/plaf/basic/BasicTextFieldUI.java +++ b/javax/swing/plaf/basic/BasicTextFieldUI.java @@ -90,7 +90,8 @@ public class BasicTextFieldUI extends BasicTextUI { if (event.getPropertyName().equals("editable")) { - if (textComponent.isEditable()) + boolean editable = ((Boolean) event.getNewValue()).booleanValue(); + if (editable) textComponent.setBackground(background); else textComponent.setBackground(inactiveBackground); |