The JMenuBar with JToolbar into the JPanel

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);
	}


Published 34 original articles · won praise 9 · views 90000 +

Guess you like

Origin blog.csdn.net/tianyatest/article/details/47057677