2

JToolBar can be attached and detached from the frame or panel into a separate window. So I want to use it as set of emergency commands and indicators. The problem is when detached if you minimize the frame to which it belongs , the toolbar also minimizes , I want for it to stay on the screen.

user1633277
  • 510
  • 2
  • 7
  • 14

1 Answers1

0
 the toolbar also minimizes , I want for it to stay on the screen

Set the toolbar not float-able. As a sample code

JToolBar toolbar=new JToolBar();
toolbar.setFloatable(false);

...
toolbar.add(YourCompoenthere);

...

It will restrict the toolbar to detach from frame or panel. see Java docs and an Example

Shahrzad
  • 1,062
  • 8
  • 26