Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove items from menu in netBeans platform?

I have module application. When I run it, the main window of that app has quite complex menu. How to remove some items from menu?

like image 272
ahoj Avatar asked Mar 12 '10 19:03

ahoj


3 Answers

You can remove menu items from the menu bar by adding entries to your project's layer.xml file.

You should read through 'Tweaking the User Interface' from the 'NetBeans Platform HTML Editor' tutorial to get a rough idea of what you will need to do.

There is another tutorial-ish description of using the layer file to hide items, too.

like image 92
vkraemer Avatar answered Nov 11 '22 17:11

vkraemer


In netbeans 8.0 , the layer file is generated when ever a module contains 'configuration type' annonations in java code, for example a module with top component. The generated layer.xml is located at build directory classes/META-INF/generated-layer.xml. However, the generated-layer.xml is not editable. To hide/show menubar / tool bar, click on the module, click other and add XML layer file. Now under the important files you can see XML layer. Expand it. Now expand . Expand the "Menu Bar". Delete the menu bar which you don't want.

like image 3
suresh rathnaraj Avatar answered Nov 11 '22 17:11

suresh rathnaraj


The easier way appears to be, as Martin Krauskopf wrote:

Just go to:

Projects view (Ctrl-1) >> your module >> Important Files >> XML Layer >> Menu Bar >> Help

and delete what you want (it will actually generate appropriate content in layer.xml of the module).

like image 2
johnstosh Avatar answered Nov 11 '22 16:11

johnstosh