11

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?

givanse
  • 14,503
  • 8
  • 51
  • 75
ahoj
  • 113
  • 1
  • 1
  • 4

4 Answers4

11

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.

vkraemer
  • 9,864
  • 2
  • 30
  • 44
  • The first item is good for removing items (the question asked), but leaves a decent leap for adding them (what I was looking for). In any case, I found this helpful. – sage Jun 18 '11 at 01:44
  • I think the section on tweaking the menu has been removed from the first linked document – Dmitry Avtonomov Jun 04 '13 at 20:07
3

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.

2

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).

gEdringer
  • 16,284
  • 3
  • 14
  • 27
johnstosh
  • 21
  • 1
0

You can remove it in layer.xml

layer in context - Menu Bar

here's the link

http://platform.netbeans.org/tutorials/nbm-htmleditor.html

setzamora
  • 3,560
  • 6
  • 34
  • 48