diff --git a/jadx-gui/src/main/java/jadx/gui/ui/dialog/RenameDialog.java b/jadx-gui/src/main/java/jadx/gui/ui/dialog/RenameDialog.java index f88fb96768d..de36f0c2045 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/dialog/RenameDialog.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/dialog/RenameDialog.java @@ -15,6 +15,7 @@ import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.JTextField; +import javax.swing.SwingUtilities; import javax.swing.WindowConstants; import org.jetbrains.annotations.NotNull; @@ -42,9 +43,11 @@ public class RenameDialog extends JDialog { private transient JButton renameBtn; public static boolean rename(MainWindow mainWindow, JRenameNode node) { - RenameDialog renameDialog = new RenameDialog(mainWindow, node); - UiUtils.uiRun(() -> renameDialog.setVisible(true)); - UiUtils.uiRun(renameDialog::initRenameField); // wait for UI events to propagate + SwingUtilities.invokeLater(() -> { + RenameDialog renameDialog = new RenameDialog(mainWindow, node); + renameDialog.initRenameField(); + renameDialog.setVisible(true); + }); return true; }