Why JMenuBar is not place in the JFrame content pane, but JToolbar place in the content pane
- 阅读更多 关于 Why JMenuBar is not place in the JFrame content pane, but JToolbar place in the content pane
问题 Why JMenuBar is not place in the content pane?is there any reason or effects when make a java gui program especially when using jframe? Thanks 回答1: As stated in Using Top-Level Containers article, the manu bar is managed by the Root Pane: Each top-level container relies on a reclusive intermediate container called the root pane. The root pane manages the content pane and the menu bar, along with a couple of other containers. You generally don't need to know about root panes to use Swing