How do you move objects from subgraph back to main

Once objects are in a subgraph, what is the correct method in code to remove these objects and have them back as part of the main view.

Just call the removeObject method on the subgraph and then add the object to the JGoDocument associated with your main JGoView.

Actually, you might find using JGoLayer.addCollection to be preferable, since it tries not to disconnect any links when a node is removed from a subgraph.

Knowing that, what is the best way to iterate thru the subgraph objects to remove them?

Create a JGoCollection, add the nodes and links you want to reparent, and then call addCollection on the layer or other subgraph that you want to own those nodes and links.

Look at the example method ungroupAction in