System has many jPanel, each has a different Jpanel JMenubar, as with the JMenuBar JToolbar into the JPanel method may be employed:
public class BasicGraphEditor extends JPanel
...
protected void installToolAndMenuBar() {
JPanel jp = new JPanel();
jp.setLayout(new BorderLayout());
jp.add(new EditorToolBar(this, JToolBar.HORIZONTAL), BorderLayout.CENTER);
jp.add(new EditorMenuBar(this), BorderLayout.NORTH);
add(jp ,BorderLayout.NORTH);
}