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

EditorPane throws Exception when trying to display simple html

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 5.0
    • client-libs

      EditorPane throws exception for displaying simple html on
      windows 2k(Microsoft Windows 2000 [Version 5.00.2195]) using tiger b28.

      Steps to reproduce:
      1) Run the attached test case TestEditorPane.java (Make sure you put attached TestEditorPane.html file in
         current working directory as while executing TestEditorPane uses TestEditorPane.html).
          
      2) Testcase will throw following exception:
      java.lang.NullPointerException
              at javax.swing.text.LabelView.getFontMetrics(Unknown Source)
              at javax.swing.text.html.InlineView.getLongestWordSpan(Unknown Source)
              at javax.swing.text.html.ParagraphView.calculateMinorAxisRequirements(Unknown Source)
              at javax.swing.text.BoxView.checkRequests(Unknown Source)
              at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
              at javax.swing.text.BoxView.layout(Unknown Source)
              at javax.swing.text.FlowView.layout(Unknown Source)
              at javax.swing.text.BoxView.setSize(Unknown Source)
              at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
              at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
              at javax.swing.text.BoxView.layout(Unknown Source)
              at javax.swing.text.BoxView.setSize(Unknown Source)
              at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
              at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
              at javax.swing.text.BoxView.layout(Unknown Source)
              at javax.swing.text.BoxView.setSize(Unknown Source)
              at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
              at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(Unknown Source)
              at javax.swing.JComponent.getPreferredSize(Unknown Source)
              at javax.swing.JEditorPane.getPreferredSize(Unknown Source)
              at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
              at java.awt.Container.layout(Unknown Source)
              at java.awt.Container.doLayout(Unknown Source)
              at java.awt.Container.validateTree(Unknown Source)
              at java.awt.Container.validate(Unknown Source)
              at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source)
              at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
              at java.awt.event.InvocationEvent.dispatch(Unknown Source)
              at java.awt.EventQueue.dispatchEvent(Unknown Source)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.run(Unknown Source)

      Note:
      - Reproducible on Tiger build 28, On previous builds testcase works fine without exception.
      - Also reproducible on 11.Nov.2003 and 28.Oct.2003 Swing PITS.

            idk Igor Kushnirskiy (Inactive)
            hsinghsunw Hemant Singh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: