diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 2c1b151774..406ab878e9 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -85,12 +85,10 @@ import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.SwingConstants; -import javax.swing.SwingUtilities; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.undo.UndoManager; import java.awt.Dimension; import java.awt.FontMetrics; -import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; @@ -1379,7 +1377,7 @@ public abstract class JTemplate> public void resetPredefinedStyle(String styleName) { this.getTarget().setPredefinedStyleName(styleName, true); refreshPredefinedState(); - SwingUtilities.invokeLater(new Runnable() { + UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { JTemplate.this.fireTargetModified();