Hi Martin,
Let me state your requirement in my words first.
- You need custom swing components in your palette
- You need new custom properties to your custom components
- You want those new properties to appear in the properties panel so you can set them in design time
The above mentioned things are possible in NetBeans IDE.
NetBeans IDE allows you to add custom components to Palette. You need to follow some rules as follows:
- The custom component shall have a no arguments constructor
- The custom component shall be in a compiled state, the palette manager uses the class file to add it.
- The new properties will be automatically shown in the Properties panel, provided they have valid getter and setter methods according to the Java bean standards.
I have not written the method of adding a custom component to palette as you have already done that as mentioned by you. The NetBeans Palette allows you to create new Palette categories and add new components to the Palette from a JAR file, or a project also if the class is compiled.
with regards
Tushar
enter code here