Installed in my toolbar is a TopComponent with a JLabel and JTextField. (Same approach as in the NetBeans Google Toolbar Module Tutorial, except that I'm using a TopComponent instead of a JPanel.) However, you also see a popup. The menu items in the popup come from my layer.xml file. I've added a MouseListener to the JTextField, which triggers the building of the menu items when the popup is invoked. The building of the popup menu items is done through the Lookup API, which Tonny finds absolutely fantastic, as you'll see when you read the interview (once it is published). As a result, it is very easy for external contributors to add their own menu items to my popup, because they can just register their contributions in the same folder structure that I did when I created my module:
<attr name="originalFile" stringvalue="Actions/Window/org-mysearch-GoogleAction.instance"/>
<attr name="originalFile" stringvalue="Actions/Window/org-mysearch-WebcrawlerAction.instance"/>
So, if you had a menu item to add to my popup, you'd simply provide a module with your action, with a layer.xml folder structure like the above. Then the popup would be built seamlessly by the code in my module, and all you've done is contribute the action and the registration entries in your layer.xml file. For the code for this scenario, as well as a technical interview and extensive explanation of the usefulness of the above approach, you'll have to wait a few days. The publication of the interview with Tonny should be within the coming week sometime.
In other news. Toni Epple, the guy behind Jarvis, spends some time discussing his project in this brand new interview: Meet a NetBeans Module Writer: Toni Epple. (You also get to see what he looks like!) If nothing else, you should play the Flash demo that he provides in the interview. You'll see that you can already pull data from a database straight into a JasperReport and then generate a PDF document from it. Toni is looking for contributors to his project and lists some open areas that, if you want to help, you might be interested in providing. If it were up to me, then sooner or later this visual designer for JasperReports would become part of the NetBeans code base. It is really really cool.