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

Merlinb51:SwingSet2Demo:ProgressBar demo:Changing L&F causes NullPointerExcepion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • client-libs
    • beta
    • generic
    • windows_2000
    • Verified

      Steps to Reproduce:

      1) Run SwingSet2 demo on Win2000 system
      2) The SwingSet2 window has Java L&F by default.
      3) Goto ProgressBar Demo and click the 'Start Loading Text' button
      4) While the text is loading, change the L&F to 'Windows Style Look & Feel'
      The following exception is thrown:

      java.lang.NullPointerException
              at javax.swing.text.PlainView.viewToModel(PlainView.java:359)
              at javax.swing.plaf.basic.BasicTextUI$RootView.viewToModel(BasicTextUI.j
      ava:1351)
              at javax.swing.plaf.basic.BasicTextUI.viewToModel(BasicTextUI.java:904)
              at javax.swing.text.DefaultCaret.positionCaret(DefaultCaret.java:214)
              at javax.swing.text.DefaultCaret.adjustCaretAndFocus(DefaultCaret.java:3
      27)
              at javax.swing.text.DefaultCaret.mouseClicked(DefaultCaret.java:287)
              at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
      1)
              at java.awt.Component.processMouseEvent(Component.java:4865)
              at java.awt.Component.processEvent(Component.java:4688)
              at java.awt.Container.processEvent(Container.java:1299)
              at java.awt.Component.dispatchEventImpl(Component.java:3460)
              at java.awt.Container.dispatchEventImpl(Container.java:1361)
              at java.awt.Component.dispatchEvent(Component.java:3327)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3175
      )
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2899)

              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2845)
              at java.awt.Container.dispatchEventImpl(Container.java:1335)
              at java.awt.Window.dispatchEventImpl(Window.java:1338)
              at java.awt.Component.dispatchEvent(Component.java:3327)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:437)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:14
      0)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:121)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)


      I noticed that this problem started in Merlinb42.

      java -version gives

      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b51)
      Java HotSpot(TM) Client VM (build B51, mixed mode)


      ruchika.mehdiratta@Eng 2001-02-09

            svioletsunw Scott Violet (Inactive)
            rmehdirasunw Ruchika Mehdiratta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: