diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormHierarchyTreePane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormHierarchyTreePane.java index 3346f7d14e..6822422b29 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormHierarchyTreePane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormHierarchyTreePane.java @@ -23,6 +23,7 @@ import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JPanel; +import javax.swing.SwingUtilities; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -122,7 +123,12 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree private void refreshComponentTree() { componentTree.setAndScrollSelectionPath(componentTree.getSelectedTreePath()); - componentTree.refreshUI(); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + componentTree.refreshUI(); + } + }); } private JPanel getWidgetPane() {