Updating visualization after deleting E,V

  • Yuruani

    Yuruani - 2012-09-28

    Hi. I am creating a network with Jung using FRLayout and a DirectedSparseGraph.
    The network first appears fine. Then I want to draw another network on
    pressing a button.
    The action is done like this:
    Edges and vertices from the graph are removed from the graph, new vertices and edges
    are created and added to it,
    the container gets revalidated and the main content pane gets updated.

    Once that happens, a new network appears, but this time there is
    really no layout, everything
    is spread randomly.

    What am I doing wrong? Thanks

  • Joshua O'Madadhain

    You're not really giving enough detail about what you're doing to be sure.

    Are you retaining the same Graph object?
    Are you updating the layout?

    Generally, I recommend looking at the AddNodeDemo for tips on how to update the visualization as you're updating the graph.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks