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

Merlin Beta-b60, JTree throws exceptions under all windows platforms

    XMLWordPrintable

Details

    • beta2
    • generic, x86
    • generic, windows_nt
    • Verified

    Description



      Name: jbT81659 Date: 04/19/2001

      OS: all Windows platforms
      JDK: 1.4.0-b60
      TestCase: jdk/demo/jfc/SampleTree/SampleTree.jar
      JTree throws exeptions under all window platforms. Here is an example of the exceptions thrown:
      ----------------------------

      J:\builds\jdk\win32\demo\jfc\SampleTree>java -jar SampleTree.jar
      java.lang.NullPointerException
              at javax.swing.text.CompositeView.replace(CompositeView.java:199)
              at javax.swing.text.BoxView.replace(BoxView.java:160)
              at javax.swing.text.View.append(View.java:427)
              at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:492)
              at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java
      :111)
              at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:395)
              at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94
      )
              at javax.swing.text.FlowView.layout(FlowView.java:185)
              at javax.swing.text.BoxView.setSize(BoxView.java:375)
              at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:
      1518)
              at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:854)
              at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:830)
              at javax.swing.text.JTextComponent.modelToView(JTextComponent.java:1025)

              at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:702)
              at javax.swing.plaf.basic.BasicTextFieldUI$BasicFieldCaret.stateChanged(
      BasicTextFieldUI.java:211)
              at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedR
      angeModel.java:349)
              at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBounde
      dRangeModel.java:286)
              at javax.swing.plaf.basic.BasicTextFieldUI$I18nFieldView.adjustAllocatio
      n(BasicTextFieldUI.java:277)
              at javax.swing.plaf.basic.BasicTextFieldUI$I18nFieldView.insertUpdate(Ba
      sicTextFieldUI.java:447)
              at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.
      java:1406)
              at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTe
      xtUI.java:1640)
              at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.j
      ava:185)
              at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument
      .java:680)
              at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:
      640)
              at javax.swing.text.PlainDocument.insertString(PlainDocument.java:117)
              at javax.swing.text.JTextComponent.setText(JTextComponent.java:1290)
              at javax.swing.DefaultCellEditor$1.setValue(DefaultCellEditor.java:71)
              at javax.swing.DefaultCellEditor.getTreeCellEditorComponent(DefaultCellE
      ditor.java:228)
              at javax.swing.tree.DefaultTreeCellEditor.getTreeCellEditorComponent(Def
      aultTreeCellEditor.java:201)
              at javax.swing.plaf.basic.BasicTreeUI.startEditing(BasicTreeUI.java:1929
      )
              at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(Basic
      TreeUI.java:2792)
              at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTre
      eUI.java:2760)
              at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:22
      1)
              at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:22
      0)
              at java.awt.Component.processMouseEvent(Component.java:4903)
      ----------------------------
      To reproduce bug:
      1. go to ../jdk/demo/jfc/SampleTree
         this directory comes bundled with the jdk or the build
      2. in this directory execute the file SampleTree.jar using this command
         java -jar SampleTree.jar
      3. in the JTree frame click the editable checkbox
      4. play with the text of the node by adding/deleting text or changing the component orientation of the text
      5. note that exepctions are thrown on the MS-DOS prompt
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              svioletsunw Scott Violet (Inactive)
              jbenavrasunw Jonathan Benavraham (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: