{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Adding A Menu Walkthrough","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"adding-a-menu-walkthrough","__idx":0},"children":["Adding A Menu Walkthrough"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A menu is a set of menu items. Common menus in INTViewer are \"File\", \"Plot\", \"View\", \"Layer\", \"Tools\", \"Window\" and \"Help\". In this walkthrough, we will add a menu between the \"Tools\" and \"Window\" menus."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"reviewing-dependencies","__idx":1},"children":["Reviewing Dependencies"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This walkthrough doesn't have INTViewer library dependencies as it relies only on the NetBeans platform."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-your-module-template-using-netbeans-wizard","__idx":2},"children":["Creating your module template using NetBeans wizard"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File -> New Project"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the New Project wizard select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NetBeans Modules"]}," from the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Categories"]}," list and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module"]}," from the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Projects"]}," list and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next >"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Project Name"]},", specify ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["mydemomenumodule"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select option ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standalone Module"]}," and make sure to specify the INTViewer platform in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NetBeans Platform"]}," field."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next >"]}," and specify com.mycompany.myviewer.",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["mydemomenumodule"]}," for the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Code Name Base"]}," and ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["MyDemoMenuModule"]}," for the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Display Name"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate XML Layer"]}," (if this option is not present, check the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/intviewer/intviewer-platform-and-modules/registering-the-layer-xml-file"},"children":["Registering the layer.xml file"]}," article)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Finish"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Projects"]}," tree view, you should see your project which includes a number of files that have been created for you"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"customizing-the-layerxml-file","__idx":3},"children":["Customizing the layer.xml file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Edit the layer.xml file and add a folder entry with the name \"Menu\" and a sub-folder named \"MyNewMenu\"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"running-your-menu","__idx":4},"children":["Running your menu"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click the green arrow in NetBeans. Your new menu \"MyNewMenu\" has been added after the \"File\" menu."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"changing-the-position-of-your-menu","__idx":5},"children":["Changing the position of your menu"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MyDemoMenuModule"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Important Files"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["XML Layer"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<this layer in context>"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Menu Bar"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MyNewMenu is placed between File and Plot. Drag this entry between \"Tools\" and \"Window\""]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your drag and drop operation automatically edited your layer.xml file, adding a position attribute"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"running-your-menu-1","__idx":6},"children":["Running your menu"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click the green arrow in NetBeans. Your new menu \"MyNewMenu\" has been moved after the \"Tools\" menu."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To add menu items to this menu, you can follow the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/intviewer/intviewer-tutorial/using-netbeans-swing-components-walkthroughs/adding-a-menu-item-walkthrough"},"children":["menu item walkthrough"]},"."]}]},"headings":[{"value":"Adding A Menu Walkthrough","id":"adding-a-menu-walkthrough","depth":1},{"value":"Reviewing Dependencies","id":"reviewing-dependencies","depth":3},{"value":"Creating your module template using NetBeans wizard","id":"creating-your-module-template-using-netbeans-wizard","depth":3},{"value":"Customizing the layer.xml file","id":"customizing-the-layerxml-file","depth":3},{"value":"Running your menu","id":"running-your-menu","depth":3},{"value":"Changing the position of your menu","id":"changing-the-position-of-your-menu","depth":3},{"value":"Running your menu","id":"running-your-menu-1","depth":3}],"frontmatter":{"title":"Adding A Menu Walkthrough","pageId":"intviewer-tutorial/using-netbeans-swing-components-walkthroughs/adding-a-menu-walkthrough","seo":{"title":"Adding A Menu Walkthrough"}},"lastModified":"2026-10-22T14:32:05.578Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-tutorial/using-netbeans-swing-components-walkthroughs/adding-a-menu-walkthrough","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}