hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.java
changeset 1497 cd3234c89e59
parent 768 d0bebc7eefc2
child 5547 f4b087cbb361
--- a/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.java	Tue Oct 28 18:02:09 2008 -0700
+++ b/hotspot/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.java	Thu Oct 30 17:08:48 2008 -0700
@@ -28,6 +28,7 @@
 import com.sun.hotspot.igv.data.services.InputGraphProvider;
 import java.awt.BorderLayout;
 import java.io.Serializable;
+import javax.swing.SwingUtilities;
 import org.openide.ErrorManager;
 import org.openide.explorer.ExplorerManager;
 import org.openide.explorer.ExplorerUtils;
@@ -151,14 +152,18 @@
     }
 
     public void resultChanged(LookupEvent lookupEvent) {
-        InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class);
+        final InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class);
         if (p != null) {
+            SwingUtilities.invokeLater(new Runnable() {
+                public void run() {
             InputGraph graph = p.getGraph();
             if (graph != null) {
                 Group g = graph.getGroup();
                 rootNode.update(graph, g.getMethod());
             }
         }
+            });
+        }
     }
 
     final static class ResolvableHelper implements Serializable {