forms. But where are all the cool components? NetBeans just shows the default JDK Swing components - but there are lots of components out there. Wouldn't it be nicer if you could make them just appear in your IDE? And there are sites such as nbextras.org with NetBeans plug-ins, and there is an update facility built into NetBeans - so why shouldn't you be able to download JavaBeans straight into the IDE from them? Well, first, it needs to be easy to create a NetBeans module that embeds JavaBeans and puts them on the Component Palette.
So I wrote a small tool that generates a NetBeans plugin. It's a wizard, and you point it at a JAR file with some Swing components in it. It finds all the declared JavaBeans that are there, and lets you choose to add or remove other classes. Then it asks for some info like the name of the library - this will be your Beans' category on the Component Palette.
When you complete it, it generates a complete, redistributable NetBeans Module (
.nbm file - the distribution format for plug-ins - a glorified zip file), and all of the components you selected will show up on the Component Palette in their own category as soon as you install it in the IDE. Now...how to distribute these glorious plugins?
Sources are in
contrib/Beans2nbm/beans2nbm in CVS on NetBeans.org. The tool also happens to showcase one of my (far too many) weekend projects, the Wizard project.