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

Kestrel fcs "F": Changing L&F causes NullPointerException on Solaris and Windows

XMLWordPrintable

    • kestrel
    • generic
    • generic
    • Verified

      reopened by shuna.wu@eng 1999-09-15
       
      This is a bug filed by Japan, but it exists in C locale, both win & solaris
      reproduced this bug by using Kestrel fcs "F" build

      To reproduce the bug,
      1) launch SwingSet demo
      2) Click "Plain Text" folder and type anything into "Text Area"
         or "Text Field"
      3) Then click the menu "Options", change L&F
      4) you will get the exception thrown

      shuna.wu@eng 1999-09-15
      ----------------------------------------------------------------------
      Kestrel fcs "F" build on Windows 2000, NT, 95, 98 and Solaris2.6, 7

      In case that applications have text components (JTextArea, JTextField, JEditorPane)
      changing L&F on the menu causes java.lang.NullPointerException.

      L&F works fine on the case does not have any text field.

      To reproduce,
      1.Compile and run the attached programs (JTextFiled sample).
      2.At first input characters into the JTextField or clicking the filed.
      3.Then, change L&F
      4. The previous oparation of causes the exception and an application can not work.

      On Windows even if "3" is skipped, changing L&F gives the same result.

      Or this problem can be confirmed by SwingSet Demo, "Plain Text".
      Once the exception occurs, L&F can not work.


      The exception is like below;
      **************************************************************
      com.sun.java.swing.plaf.motif.MotifLookAndFeel
      action setLookAndFeel err: java.lang.NullPointerException
      java.lang.NullPointerException
              at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:754)
              at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:728)
              at javax.swing.text.JTextComponent.modelToView(JTextComponent.java:1187)
              at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:601)
              at javax.swing.text.DefaultCaret.focusGained(DefaultCaret.java:255)
              at com.sun.java.swing.plaf.motif.MotifTextUI$MotifCaret.focusGained(MotifTextUI.java:71)
              at javax.swing.text.DefaultCaret.install(DefaultCaret.java:448)
              at javax.swing.text.JTextComponent.setCaret(JTextComponent.java:729)
              at javax.swing.plaf.basic.BasicTextUI.installDefaults(BasicTextUI.java:255)
              at javax.swing.plaf.basic.BasicTextUI.installUI(BasicTextUI.java:507)
              at javax.swing.JComponent.setUI(JComponent.java:294)
              at javax.swing.text.JTextComponent.setUI(JTextComponent.java:554)
              at javax.swing.text.JTextComponent.updateUI(JTextComponent.java:564)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1087)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1098)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1098)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1098)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1098)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1098)
              at javax.swing.SwingUtilities.updateComponentTreeUI(SwingUtilities.java:1079)
              at UIManagerMenu.actionPerformed(./UIManagerMenu.java:48)
              at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1244)
              at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1296)
              at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
              at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:263)
              at javax.swing.AbstractButton.doClick(AbstractButton.java:237)
              at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:814)
              at java.awt.Component.processMouseEvent(Component.java:3671)
              at java.awt.Component.processEvent(Component.java:3500)
              at java.awt.Container.processEvent(Container.java:1255)
              at java.awt.Component.dispatchEventImpl(Component.java:2557)
              at java.awt.Container.dispatchEventImpl(Container.java:1304)
              at java.awt.Component.dispatchEvent(Component.java:2460)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2550)
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2315)
              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2218)
              at java.awt.Container.dispatchEventImpl(Container.java:1291)
              at java.awt.Window.dispatchEventImpl(Window.java:866)
              at java.awt.Component.dispatchEvent(Component.java:2460)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:322)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:107)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:97)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:88)


            tprinzing Tim Prinzing (Inactive)
            eishidasunw Etsuko Ishida (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: