JTop on the NetBeans Platform
By Geertjan on Jan 30, 2008
Then we moved most of the content from the sample's other class, i.e, the JPanel, into a TopComponent, which integrates with the NetBeans Platform. We initially simply wanted to call the JPanel from the TopComponent and then add it to the TopComponent. I think that probably failed because the JPanel might have been getting instantiated (at least) twice. So we moved everything into the TopComponent, ran the NetBeans Platform, and there it was:
We also installed it into the Visual VM:
...and into NetBeans IDE:
In the latter case, we encountered a lot of problems because, as we eventually discovered, the Visual Web Pack has a security manager that conflicts with the security manager set in the tools.jar, which is where the JConsole API is located. We tried in vain to set security policies in various places before we discovered the culprit and then simply excluded the Visual Web Pack from the IDE. Then the JTop plugin worked without a problem.
And, because the original JTop plugin uses the cool new JDK6 SwingWorker class, the TopComponent is updated automatically in the background and the thread information is continuously current. Hurray!