Skip to content

Commit

Permalink
delay of 200 milliseconds for reload tree
Browse files Browse the repository at this point in the history
  • Loading branch information
astrapi69 committed Jul 17, 2023
1 parent f4c418a commit f4d72e6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.TimeUnit;

import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
Expand Down Expand Up @@ -334,6 +335,12 @@ protected void onInitializeMigLayout()

BaseTreeNodeFactory.newDefaultMutableTreeNode(clonedTreeNode, parent, false);

try {
TimeUnit.MILLISECONDS.sleep(200);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}

reload(parent);
}
});
Expand Down

0 comments on commit f4d72e6

Please sign in to comment.