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

HopperB08:SwingSet2 Demo:IllegalArgumentException in FileChooser and Table demos

    XMLWordPrintable

Details

    • Fix Understood
    • generic
    • generic

    Description


      Hopper Build: B08
      Locale: hi_IN (Hindi)
      OSs: Solsparc 9, Solsparc 8, Win XP Prof, Win XP Home

      Steps to Reproduce with FileChooser Demo:
      ========================================

      1) On a solsparc 9 system, set hi_IN (Hindi) as the default locale.
      2) Copy the Devanagari Input Method (IndicInputMethod.jar) from
      /net/sqesvr/export/i18n/i18n_ws/OverSea/Hindi
         to
      j2sdk1.4.1/jre/lib/ext
      3) Launch the SwingSet2 Demo.
      4) Select JFileChooser Demo and click on "Show Plain JFileChooser" button to launch the filechooser.
      5) Now for the filechooser window, select "Devanagri Input Method" by
      - Clicking on the icon next to "Open" on the titlebar
      - Choose "Select Input Method" submenu item.
      - Now select "Devanagri Input Method" sub menu item.
      6) In the "File Name" text box, try to enter the word "Hindi" in Devanagri by entering the characters "ufvdor" and then hitting Enter.
      On doing so, the following exception is thrown on the console:

      Exception occurred during event dispatching:
      java.lang.IllegalArgumentException: offsetLimit must be after current position
              at java.awt.font.LineBreakMeasurer.nextOffset(LineBreakMeasurer.java:3
      )
              at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:4
      )
              at javax.swing.text.TextLayoutStrategy.sync(TextLayoutStrategy.java:32

              at javax.swing.text.TextLayoutStrategy.removeUpdate(TextLayoutStrategy
      ava:65)
              at javax.swing.text.FlowView.removeUpdate(FlowView.java:251)
              at javax.swing.plaf.basic.BasicTextFieldUI$I18nFieldView.removeUpdate(
      sicTextFieldUI.java:368)
              at javax.swing.text.View.forwardUpdateToView(View.java:1210)
              at javax.swing.text.FlowView$LogicalView.forwardUpdateToView(FlowView.
      va:697)
              at javax.swing.text.View.forwardUpdate(View.java:1183)
              at javax.swing.text.View.removeUpdate(View.java:748)
              at javax.swing.text.FlowView.removeUpdate(FlowView.java:250)
              at javax.swing.plaf.basic.BasicTextFieldUI$I18nFieldView.removeUpdate(
      sicTextFieldUI.java:368)
              at javax.swing.plaf.basic.BasicTextUI$RootView.removeUpdate(BasicTextU
      java:1430)
              at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.removeUpdate(Basic
      xtUI.java:1665)
              at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument
      ava:242)
              at javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.jav
      611)
              at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:575)
              at javax.swing.text.JTextComponent.setText(JTextComponent.java:1382)
              at javax.swing.plaf.metal.MetalFileChooserUI.setFileName(MetalFileChoo
      rUI.java:1510)
              at javax.swing.plaf.metal.MetalFileChooserUI.doSelectedFileChanged(Met
      FileChooserUI.java:1298)
              at javax.swing.plaf.metal.MetalFileChooserUI.access$2400(MetalFileChoo
      rUI.java:35)
              at javax.swing.plaf.metal.MetalFileChooserUI$12.propertyChange(MetalFi
      ChooserUI.java:1429)
              at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Swi
      PropertyChangeSupport.java:264)
              at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Swi
      PropertyChangeSupport.java:232)
      .
      .
      .


      Whereas no exception is thrown on entering the word "Hindi" in Devanagri for "Frame title" in Internal Frame demo.
      This bug can also be reproduced on English Win XP Home and Prof edition, and Solsparc 8 en_US by using the Devanagri Input Method (IndicInputMethod.jar).

      Steps to Reproduce with TableDemo:
      =================================

      1) Launch Table Demo in SwingSet2 demo.
      2) Select "Devanagri Input Method" for the SwingSet2 window.
      3) Double click at the end of the word "Mike" in the first cell of "Firstname" column.
      4) Enter the word "Hindi" in devanagri and hit Enter.
      5) Now in the second row, second cell, double click at the end fo the word "Andrews" to move the caret to that cell.
      On doing so, the above mentioned IllegalArgumentException is thrown on the console window.

      ###@###.### 2002-04-15

      Attachments

        Activity

          People

            peterz Peter Zhelezniakov
            rmehdirasunw Ruchika Mehdiratta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: