diff --git a/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java b/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java index 9d24278e99..f47ccfc8b7 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java @@ -84,7 +84,7 @@ public class UILabel extends JLabel implements UITextComponent { return; } String text = this.getText(); - if (text.length() > 1 && text.charAt(text.length() - 1) == ':') { + if (StringUtils.isNotEmpty(text) && text.length() > 1 && text.charAt(text.length() - 1) == ':') { text = ":" + text.substring(0, text.length() - 1); this.setText(text); }