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

ArrayIndexOutOfBoundsException in JTextField

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 6u10
    • client-libs

      FULL PRODUCT VERSION :
      java version "1.6.0_17"
      Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
      Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      ver XP

      A DESCRIPTION OF THE PROBLEM :
      The problem occurs if I switch between TextFields while I type something on the keyboard. I don't know exactly when the error occurs. I have to switch and type for a longer time, then the exception will be thrown.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      typing on the keyboard and switching between TextFields on the same time

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      the typed text in the TextField
      ACTUAL -
      Exception

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      --- Message: 7---
      java.lang.ArrayIndexOutOfBoundsException: 7

      at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:492)
      at javax.swing.text.Utilities.getTabbedTextOffset(Utilities.java:381)
      at javax.swing.text.Utilities.getTabbedTextOffset(Utilities.java:302)
      at javax.swing.text.Utilities.getTabbedTextOffset(Utilities.java:286)
      at javax.swing.text.PlainView.viewToModel(PlainView.java:403)
      at javax.swing.text.FieldView.viewToModel(FieldView.java:263)
      at javax.swing.plaf.basic.BasicTextUI$RootView.viewToModel(BasicTextUI.java:1540)
      at javax.swing.plaf.basic.BasicTextUI.viewToModel(BasicTextUI.java:1089)
      at javax.swing.text.DefaultCaret.moveCaret(DefaultCaret.java:311)
      at javax.swing.text.DefaultCaret.mouseDragged(DefaultCaret.java:565)
      at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:303)
      at java.awt.Component.processMouseMotionEvent(Component.java:6311)
      at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3285)
      at java.awt.Component.processEvent(Component.java:6032)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4255)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Window.dispatchEventImpl(Window.java:2475)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

      REPRODUCIBILITY :
      This bug can be reproduced always.

            rupashka Pavel Porvatov (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: