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

Clicking multiple times on JTree or JTable having non english characters throws Exception in WinXP

XMLWordPrintable

    • Cause Known
    • generic
    • generic

      Follow steps below..

      1) Copy jars from jre/lib/im to jre/lib/ext
      2) Launch SwingSet2
      3) Change look and feel to Windows style laf
      4) Goto tree demo
      5) Edit one node
      6) Change input to Devanagari mode
      7) Enter few hindi characters (Screenshot attached)
      8) Commit the editing
      9) Try editing the same node by double clicking/clicking etc

      IllegalArgumentException is thrown

      Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: offse
      tLimit must be after current position
              at java.awt.font.LineBreakMeasurer.nextOffset(LineBreakMeasurer.java:337
      )
              at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422
      )
              at javax.swing.text.TextLayoutStrategy.sync(TextLayoutStrategy.java:298)

              at javax.swing.text.TextLayoutStrategy.removeUpdate(TextLayoutStrategy.j
      ava:65)
              at javax.swing.text.FlowView.removeUpdate(FlowView.java:252)
              at javax.swing.plaf.basic.BasicTextFieldUI$I18nFieldView.removeUpdate(Ba
      sicTextFieldUI.java:444)
              at javax.swing.text.View.forwardUpdateToView(View.java:1219)
              at javax.swing.text.FlowView$LogicalView.forwardUpdateToView(FlowView.ja
      va:764)
              at javax.swing.text.View.forwardUpdate(View.java:1192)
              at javax.swing.text.View.removeUpdate(View.java:757)
              at javax.swing.text.FlowView.removeUpdate(FlowView.java:251)
              at javax.swing.plaf.basic.BasicTextFieldUI$I18nFieldView.removeUpdate(Ba
      sicTextFieldUI.java:444)
              at javax.swing.plaf.basic.BasicTextUI$RootView.removeUpdate(BasicTextUI.
      java:1540)
              at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.removeUpdate(BasicTe
      xtUI.java:1800)
              at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.j
      ava:243)
              at javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:
      608)
              at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:576)
              at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:652)
              at javax.swing.text.JTextComponent.setText(JTextComponent.java:1697)
              at javax.swing.DefaultCellEditor$1.setValue(DefaultCellEditor.java:72)
              at javax.swing.DefaultCellEditor.getTreeCellEditorComponent(DefaultCellE
      ditor.java:239)
              at javax.swing.tree.DefaultTreeCellEditor.getTreeCellEditorComponent(Def
      aultTreeCellEditor.java:198)
              at javax.swing.plaf.basic.BasicTreeUI.startEditing(BasicTreeUI.java:2142
      )
              at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeU
      I.java:3613)
              at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.j
      ava:3553)
              at java.awt.Component.processMouseEvent(Component.java:5952)
              at javax.swing.JComponent.processMouseEvent(JComponent.java:3285)
              at java.awt.Component.processEvent(Component.java:5720)
              at java.awt.Container.processEvent(Container.java:1960)
              at java.awt.Component.dispatchEventImpl(Component.java:4365)
              at java.awt.Container.dispatchEventImpl(Container.java:2018)
              at java.awt.Component.dispatchEvent(Component.java:4195)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4222
      )
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3883)

              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3816)
              at java.awt.Container.dispatchEventImpl(Container.java:2004)
              at java.awt.Window.dispatchEventImpl(Window.java:2210)
              at java.awt.Component.dispatchEvent(Component.java:4195)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
      ad.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
      java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
      ad.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

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

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
      Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: offse
      t out of bounds
              at java.text.RuleBasedBreakIterator.checkOffset(RuleBasedBreakIterator.j
      ava:724)
              at java.text.RuleBasedBreakIterator.preceding(RuleBasedBreakIterator.jav
      a:772)
              at javax.swing.text.GlyphView.getBreakSpotUseBreakIterator(GlyphView.jav
      a:799)
              at javax.swing.text.GlyphView.getBreakSpot(GlyphView.java:728)
              at javax.swing.text.GlyphView.getBreakWeight(GlyphView.java:668)
              at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:
      702)
              at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.jav
      a:215)
              at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
              at javax.swing.text.BoxView.getPreferredSpan(BoxView.java:519)
              at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:
      701)
              at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.jav
      a:215)
              at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
              at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:325)
              at javax.swing.text.BoxView.layout(BoxView.java:682)
              at javax.swing.text.FlowView.layout(FlowView.java:202)
              at javax.swing.text.BoxView.setSize(BoxView.java:379)
              at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:
      1638)
              at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:956)
              at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:1288)

              at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:1267)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
      ad.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
      java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
      ad.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

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

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

            peterz Peter Zhelezniakov
            rmenonsunw Rakesh Menon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: