Skip to main content

Geerjan Wielenga: How to Centralize the Management of NetBeans Platform Actions (Part 2)

Geertjan Wielenga continues a series with How to Centralize the Management of NetBeans Platform Actions (Part 2):

Let's say we have a general TopComponent, which we want to share between multiple different modules. I.e., each module will provide its own Action. When the Action is invoked, e.g., from a menu item, a JPanel provided by the module that provides the Action will be added to the TopComponent, once the previous content in the TopComponent has been removed. Creating a generic Action providing the above functionality, following Jesse's corrections in the comment to yesterday's blog entry, you would do the following...