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

Selecting all entries in a text component while in compose mode and deleting throws Exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 6
    • client-libs
    • Cause Known
    • generic
    • generic

      When the input is in compose mode, doing a select all and delete/backspace throws exception.

      Steps:
      ------
      1) Copy im jars under jre/lib/im to jre/lib/ext
      2) Launch Notepad demo
      3) Select Devanagari input method
      4) Enter a few characters for which compose will be shown below the current line (Eg: "f")
      5) Do select all
      6) Press backspace

      Throws IllegalArgumentException.. Screenshot of UI attached..

      C:\>java -jar c:\j2sdk1.6.0\demo\jfc\Notepad\Notepad.jar
      Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Zero
      length iterator passed to TextLayout constructor.
              at java.awt.font.TextLayout.<init>(TextLayout.java:494)
              at com.sun.java.swing.SwingUtilities2.drawString(SwingUtilities2.java:82
      6)
              at javax.swing.text.Utilities.paintComposedText(Utilities.java:867)
              at javax.swing.text.GlyphView.paint(GlyphView.java:386)
              at javax.swing.text.BoxView.paintChild(BoxView.java:144)
              at javax.swing.text.BoxView.paint(BoxView.java:407)
              at javax.swing.text.BoxView.paintChild(BoxView.java:144)
              at javax.swing.text.BoxView.paint(BoxView.java:407)
              at javax.swing.text.ParagraphView.paint(ParagraphView.java:582)
              at javax.swing.text.BoxView.paintChild(BoxView.java:144)
              at javax.swing.text.BoxView.paint(BoxView.java:407)
              at javax.swing.text.BoxView.paintChild(BoxView.java:144)
              at javax.swing.text.BoxView.paint(BoxView.java:407)
              at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:13
      58)
              at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:649)
              at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:791)
              at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:770)
              at javax.swing.JComponent.paintComponent(JComponent.java:710)
              at javax.swing.JComponent.paint(JComponent.java:975)
              at javax.swing.JComponent.paintToOffscreen(JComponent.java:5077)
              at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManag
      er.java:279)
              at javax.swing.RepaintManager.paint(RepaintManager.java:1079)
              at javax.swing.JComponent._paintImmediately(JComponent.java:5025)
              at javax.swing.JComponent.paintImmediately(JComponent.java:4843)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:688)

              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:644)

              at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:6
      24)
              at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System
      EventQueueUtilities.java:128)
              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: