Question

remove this toolbar

How to remove the toolbar above in a TopComponent (shown in Editor) on netbeans platform. I tried turning off the checkboxes in Branding->Windows but still the toolbar above appears...

Was it helpful?

Solution

That component is the tab switcher and is part of the org.netbeans.swing.tabcontrol.plaf.BasicScrollingTabDisplayerUI.

It is an integrated part of the component and cannot easily be removed. Your only option is to replace the entire TabDisplayerUI.

If you require the tabs but not the tab switcher you could extend BasicScrollingTabDisplayerUI and override the method that creates the tab switcher. Then you could register this class as the TabDisplayerUI:

UIManager.put(
    TabDisplayer.EDITOR_TAB_DISPLAYER_UI_CLASS_ID, 
    "com.example.MyTabDisplayerUI");

Your module will need a dependency on the Tab Control module. See the link above for a complete description.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top