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

[CheckBox] StringIndexOutOfBoundsException when GraphicTextGap has been set big.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.1
    • fx2.0.2
    • javafx
    • 2.0.2b05

      Run main3.java from attached application.
      Set sliders' value (which bidirectionally manage GraphicTextGap value) to 130 or greater.
      You will get such exception:

      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
              at java.lang.String.substring(String.java:1937)
              at com.sun.javafx.scene.control.skin.Utils.computeClippedWrappedText(Utils.java:404)
              at com.sun.javafx.scene.control.skin.LabeledSkinBase.updateDisplayedText(LabeledSkinBase.java:424)
              at com.sun.javafx.scene.control.skin.LabeledSkinBase.layoutLabelInArea(LabeledSkinBase.java:867)
              at com.sun.javafx.scene.control.skin.CheckBoxSkin.layoutChildren(CheckBoxSkin.java:84)
              at javafx.scene.Parent.layout(Parent.java:900)
              at javafx.scene.Parent.layout(Parent.java:910)
              at javafx.scene.Parent.layout(Parent.java:910)
              at javafx.scene.Scene.layoutDirtyRoots(Scene.java:455)
              at javafx.scene.Scene.doLayoutPass(Scene.java:428)
              at javafx.scene.Scene.access$3000(Scene.java:133)
              at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:1797)
              at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:292)
              at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:385)
              at com.sun.javafx.tk.quantum.QuantumToolkit$8.run(QuantumToolkit.java:311)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
              at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
              at java.lang.Thread.run(Thread.java:662)

            leifs Leif Samuelsson (Inactive)
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: