Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我想在菜单栏中保留一个菜单栏和菜单,并且我想将注销按钮对齐到右侧,如下图所示。
我怎样才能做到这一点?
您可以在帮助和注销之间添加Box.createHorizontalGlue()到您的 JMenuBar。
Box.createHorizontalGlue()