How to disable dragging of JToolbar?
Asked Answered
R

1

6

How to disable dragging of JToolbar? I placed it in a BorderLayout. I tried finding a method. Is there such a method ? THanks

Ravenna answered 22/2, 2015 at 21:8 Comment(0)
B
21

I think you are looking for:

toolBar.setFloatable( false);
Belfry answered 22/2, 2015 at 21:13 Comment(1)
I assumed the same and am surprised in 21.0.3; OpenJDK 64-Bit Server VM 21.0.3+9-Ubuntu-1ubuntu122.04 the toolbar is floatable regardless of that setting. A workaround is to replace the JToolBar by a JPanel.Traveler

© 2022 - 2024 — McMap. All rights reserved.