g.addEdge("is a", "C++", "Programming Language");
g.addEdge("is a", "Perl", "Programming Language");
g.addEdge("is a", "Python", "Programming Language");
NanoGraph gp = new NanoGraph();
DebugGraphListener dgl = new DebugGraphListener(new OutputStreamWriter(System.out));
gp.getSelectionManager().addSelectionListener(dgl);
gp.setGraph(g);
gp.setLayout(new CircularLayoutAlgorithm(200));
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(gp);