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

javax.swing.plaf.basic.BasicTextUI calls editor.getCursor() very early

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • client-libs
    • b53
    • x86
    • windows_xp

      Method BasicTextUI.installDefaults() is called very early in a text fields lifetime, usually before it has been added to a container component. installDefaults() then calls updateCursor() which in returns editor.getCursor(). In many cases editor will be an application specific object whose getCursor() method will be called much earlier with Mustang then has been the case with earlier Java releases including 5.0.
      When I tested my customer's Swing client application on Java 6.0-b45 this caused a NullPointerException because their editor's getCursor() method was calling parent.getCursor() internally. On previous Java releases (1.3.1_16, 1.4.2_08, 5.0_04) the same application code just runs well.

            mknyazevsunw Michael Knyazev (Inactive)
            amuellersunw Andreas Mueller (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: