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.
JToolBar 可以从框架或面板中附加和分离到一个单独的窗口中。所以我想用它作为一组紧急命令和指示器。问题是当你最小化它所属的框架时,工具栏也会最小化,我希望它留在屏幕上。
the toolbar also minimizes , I want for it to stay on the screen
将工具栏设置为不可浮动。作为示例代码
JToolBar toolbar=new JToolBar(); toolbar.setFloatable(false); ... toolbar.add(YourCompoenthere); ...
它将限制工具栏与框架或面板分离。请参阅Java 文档和示例