diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactsViewer.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactsViewer.java index 13d833f68b..2fec1406c0 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactsViewer.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactsViewer.java @@ -118,16 +118,12 @@ public final class ContactsViewer extends JPanel implements RelationshipsViewer{ outlineViewPanel.getExplorerManager().getRootContext().addNodeListener(new NodeAdapter(){ @Override public void childrenAdded(NodeMemberEvent nme) { - SwingUtilities.invokeLater(() -> { - updateOutlineViewPanel(); - }); + updateOutlineViewPanel(); } @Override public void childrenRemoved(NodeMemberEvent nme) { - updateOutlineViewPanel(); SwingUtilities.invokeLater(() -> { - updateOutlineViewPanel(); - }); + updateOutlineViewPanel(); } }); } diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessagesViewer.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessagesViewer.java index d59fda48b1..8bda078161 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessagesViewer.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessagesViewer.java @@ -130,16 +130,12 @@ public final class MessagesViewer extends JPanel implements RelationshipsViewer outlineViewPanel.getExplorerManager().getRootContext().addNodeListener(new NodeAdapter() { @Override public void childrenAdded(NodeMemberEvent nme) { - SwingUtilities.invokeLater(() -> { - updateOutlineViewPanel(); - }); + updateOutlineViewPanel(); } @Override public void childrenRemoved(NodeMemberEvent nme) { - SwingUtilities.invokeLater(() -> { - updateOutlineViewPanel(); - }); + updateOutlineViewPanel(); } }); } diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/OutlineViewPanel.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/OutlineViewPanel.java index c84c7ae0a7..4e04db4f53 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/OutlineViewPanel.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/OutlineViewPanel.java @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.communications.relationships; import java.awt.CardLayout; +import javax.swing.SwingUtilities; import org.openide.explorer.ExplorerManager; import static org.openide.explorer.ExplorerUtils.createLookup; import org.openide.explorer.view.OutlineView; @@ -62,17 +63,21 @@ public class OutlineViewPanel extends javax.swing.JPanel implements ExplorerMana * @param message String message to show on the panel. */ public void hideOutlineView(String message) { - CardLayout layout = (CardLayout)this.getLayout(); - layout.show(this, "messageCard"); //NON-NLS - messageLabel.setText(message); + SwingUtilities.invokeLater(() -> { + CardLayout layout = (CardLayout)this.getLayout(); + layout.show(this, "messageCard"); //NON-NLS + messageLabel.setText(message); + }); } /** * Hides the message panel and shows the OutlineView. */ public void showOutlineView() { - CardLayout layout = (CardLayout)this.getLayout(); - layout.show(this, "outlineCard"); //NON-NLS + SwingUtilities.invokeLater(() -> { + CardLayout layout = (CardLayout)this.getLayout(); + layout.show(this, "outlineCard"); //NON-NLS + }); } /**