Create a labeled component and add following settings:
label.setPrefSize(200, 40);
label.setWrapText(true);
label.setTextOverrun(OverrunStyle.CENTER_WORD_ELLIPSIS);
It's easy to reproduce for Asian languages text when the preferred size is small than the size of the text. And sometimes it also happens for English text.
label.setPrefSize(200, 40);
label.setWrapText(true);
label.setTextOverrun(OverrunStyle.CENTER_WORD_ELLIPSIS);
It's easy to reproduce for Asian languages text when the preferred size is small than the size of the text. And sometimes it also happens for English text.
- relates to
-
JDK-8117567 [CheckBox] StringIndexOutOfBoundsException when GraphicTextGap has been set big.
- Closed