Errata: During the drafting of this article, I overlooked the list of inherited methods of the JMenuBar class.
勘误:在本文的草稿阶段,我忽略了jmenubar类的继承方法的列表。
It's not as easy to modify a JMenuBar; there's no interface for removing or replacing individual menus from the bar.
修改JMenuBar没有这么容易;没有从工具栏上删除和替换单个菜单的接口。
As this article's JMenuBar example shows, even when there's no support for a task in the API, you might be able to implement it yourself, albeit a bit indirectly.
像本文的JMenuBar示例所显示的,即使当api不支持某个任务时,您也能自己实现它,虽然有一点间接。
应用推荐