{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Implementing A Window","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":"implementing-a-window","__idx":0},"children":["Implementing A Window"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"adding-a-viewer-window-walkthrough","__idx":1},"children":["Adding a Viewer Window Walkthrough"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ILayeredWindow and IWindow3D objects can be used for most visualization needs. In some cases, a custom window component needs to be implemented. In this example, we will create a window with the content \"Hello World\", and open this window upon the activation of a menu item."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial relies on the com.interactive.intviewerapi.windows.AbstractViewerWindow class."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The window created will be visible inside the desktop area. For a window along the desktop area, follow this ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/intviewer/intviewer-tutorial/using-netbeans-swing-components-walkthroughs/adding-a-window-walkthrough"},"children":["other tutorial"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"reviewing-dependencies","__idx":2},"children":["Reviewing Dependencies"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The implementation of a window requires one INT module that is part of the INTViewer platform:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IntviewerCore"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Lookup API (a NetBeans module)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-your-module-template-using-netbeans-wizard","__idx":3},"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":["mydemoviewerwindowmodule"]}]}]},{"$$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":["mydemoviewerwindow"]}," for the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Code Name Base"]}," and M_yDemoViewerWindowModule_ for the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Display Name"]},"."]}]},{"$$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":["Right click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MyDemoViewerWindowModule"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New"]}," -> ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["XML Layer ..."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$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":"configuring-your-module","__idx":4},"children":["Configuring your Module"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Projects"]}," tree, right click on the module ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MyDemoViewerWindowModule"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Properties"]}," from the list."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Categories"]},", select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Libraries"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Java plaform"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["JDK1.7"]}," . If you don't see this option, you will need to install jdk1.7 and load it into NetBeans using option ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tools->Java Platforms"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click on the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add"]}," button next to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Dependencies"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the list, select ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["IntviewerCore"]}," and ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Lookup API"]}," and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OK"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OK"]}," in Project Properties Dialog"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-a-viewerwindow-class","__idx":5},"children":["Creating a ViewerWindow class"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Projects"]}," tree, right click on the module ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MyDemoViewerWindowModule"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New -> Java Class..."]}," from the list."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter DemoViewerWindow as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Class Name"]}," and select com.mycompany.myviewer.mydemoviewerwindow as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Package"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make this class extend AbstractViewerWindow"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Automatically add an import for AbstractViewerWindow"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Automatically create the skeleton of required methods for this class"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Customize the getAllData method"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This requires the import of java.util.List."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Right-click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Insert Code"]}," -> ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Constructor"]}," to override the constructor and enter a display name for the window (My Demo Window in this example)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add a \"Hello World\" label to this window"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This requires the import of javax.swing.JLabel and java.awt.FlowLayout."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can download the DemoViewerWindow.java file from the attachments at the bottom this page."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-an-action-class","__idx":6},"children":["Create an Action class"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a class \"DemoViewerWindowAction\" in \"com.mycompany.myviewer.mydemoviewerwindow\" with the following implementation:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/intviewer/intviewer-tutorial/using-netbeans-swing-components-walkthroughs/adding-a-menu-item-walkthrough"},"children":["detailed walkthrough"]}," to create Action classes and reference them in a layer.xml file is available."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"customizing-the-layerxml-file","__idx":7},"children":["Customizing the layer.xml file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can download the layer.xml file from the attachments at the bottom this page."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"running-your-viewer-window","__idx":8},"children":["Running your Viewer Window"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click the green arrow in the toolbar"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Window"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DemoViewerWindow"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The window is displayed and referenced in the \"layers window\"."]}]}]},"headings":[{"value":"Implementing A Window","id":"implementing-a-window","depth":1},{"value":"Adding a Viewer Window Walkthrough","id":"adding-a-viewer-window-walkthrough","depth":2},{"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":"Configuring your Module","id":"configuring-your-module","depth":3},{"value":"Creating a ViewerWindow class","id":"creating-a-viewerwindow-class","depth":3},{"value":"Create an Action class","id":"create-an-action-class","depth":3},{"value":"Customizing the layer.xml file","id":"customizing-the-layerxml-file","depth":3},{"value":"Running your Viewer Window","id":"running-your-viewer-window","depth":3}],"frontmatter":{"title":"Implementing A Window","pageId":"intviewer-tutorial/using-intviewer-components-walkthroughs/implementing-a-window","seo":{"title":"Implementing A Window"}},"lastModified":"2026-10-22T14:32:05.578Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-tutorial/using-intviewer-components-walkthroughs/implementing-a-window","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}