All of the tutorials show some common code in the constructor that creates an instance of JGraph and places it into a frame. The code is:
_jgraph = new JGraph(); _graphPane = _jgraph.getGraphPane(); TutorialWindow window = new TutorialWindow("Simple graph tutorial"); window.getContentPane().add("Center",_jgraph); window.setSize(600,400); window.setVisible(true);
(Where _jgraph and _graphPane are private variables of the class.) Every JGraph contains a top-level canvas pane, which in turn contains layers. By default, the top-level pane is an instance of GraphPane.