Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6263726

REGRESSION: BasicTextUI.installUI() sets wrong cursor on non-editable text components

XMLWordPrintable

    • b42
    • generic
    • generic

      As a result of the fix to 4851758 there is a regression in how the cursor is set on non-editable text components. If you inspect the code of BasicTextUI, you can see when the editable property change is fired, we set the cursor based on the editability (DEFAULT_CURSOR or TEXT_CURSOR). However, in installDefaults, we always use TEXT_CURSOR. As a result, after any look and feel switch or a call to updateUI, the wrong cursor is installed on a non-editable text component.

      You can see this with SwingSet2 since it calls updateUI every time you switch to a demo. Switch to the text demo and move the mouse into the HTML component. Notice that it's the TEXT_CURSOR. Move your mouse over a link and the cursor changes to a HAND. Now move off the link and the cursor is finally correct. Switch away and back to the text demo and the same problem reoccurs.
      ###@###.### 2005-04-29 20:24:27 GMT

            mknyazevsunw Michael Knyazev (Inactive)
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: