Search code examples
javaeclipseswingx

How to add SwingX palette in Window Builder?


I am using Windows Builder Pro in my Eclipse Helios. In NetBeans I know how to add SwingX palette. How can I add SwingX palette in Windows Builder?


Solution

  • Was playing around with it, and I have the solution. SwingX ships in 2 jars- swingx-all-1.6.3.jar and swingx-beaninfo-1.6.3.jar, the second one contains BeanInfo classes. These are necessary if you want to import them as java beans in any IDE. So you need to merge them into a single library.

    Here's what worked for me:

    • Make a directory called swingx.
    • Change to it, and unjar swingx-all-1.6.3.jar. Make a backup of META-INF/MANIFEST.MF, say to ../backup.mf.
    • Unjar swingx-beaninfo-1.6.3.jar to the same location. Its manifest will overwrite the previous one, hence we needed to backup.
    • Make sure you're in the same directory where you extracted the jars, and create a new jar that combines both of these, using the following commandline: jar -cvfm swingx-combined.jar ../backup.mf *

    This will create a fresh jar that has both the manifest (which lists all java beans within the jar) and the required BeanInfo classes.

    Import this jar into WindowBuilder and you'll be able to add the required SwingX beans from it.