// Display it all
context.getContentPane().add("Center", g);
// Build the model
final MutableGraphModel model = makeTypedModel();
bgc.setGraphModel(model);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
LevelLayout random = new LevelLayout(new BasicLayoutTarget(bgc));
random.layout(model.getRoot());
}
});
}