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?开发者_Go百科
If you right click on an entry in the palette, you can open up the Palette Manager, then "Add Category", and "Add Entry" or "Import Jar".
Also, if you just add whatever component you want (ie: JXTable) using Custom, it'll automatically show up in a Custom category in your palette.
A cleaner solution is simply to add both swingx-all-1.6.4.jar
and swingx-beaninfo-1.6.4.jar
to your build path.
Then, in the palette manager, import the swingx-all-1.6.4.jar, selecting all items.
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 ofMETA-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.
I was unable to add to the pallete. But, if you add the component in the source code it apears at the preview. Then you can drag it as if you got it from the pallete.
I hope it helps. Helped me...
First of all download SwingX 1.6.4 All -sources and SwingX 1.6.4 BeanInfo -sources from https://java.net/projects/swingx/downloads?search_tag=swingx-all-1.6.4.jar+&commit=search and then add these jars to the elipse by going to project->properties->Add External JARs.
精彩评论