2

I have a GraphStream graph (called with graph.display()) that I call from a Swing app. When I click the button to create the graph, the Swing app stays opened and the graph displays (opens up in a different window); however; the Swing app exits when I close the graph window. Is there any way, besides creating a new Swing view with the graph attached, to to keep the Swing app opened even after closing the graph window?

Thank you.

user1843790
  • 87
  • 1
  • 4

1 Answers1

6

Answering myself:

It's as easy as adding the second line:

    Viewer viewer = graph.display();
    viewer.setCloseFramePolicy(Viewer.CloseFramePolicy.HIDE_ONLY);
user1843790
  • 87
  • 1
  • 4