Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » problem adding component to palette(problem adding component to palette)
problem adding component to palette [message #1222127] Thu, 19 December 2013 13:19 Go to next message
Ivko Cvejic is currently offline Ivko Cvejic
Messages: 1
Registered: December 2013
Junior Member
I'm hoping that my problem has a easy-ish solution and that someone out there has run into this type of issue before. I'm designing a gui in Eclipse using the WindowBuilder design screen. I would like to add a JFreeChart chart to my gui, and I would also like to have the chart object available/manipulatable in the design window. My understanding is that the Palette is extendable, so I figured I would simply add a new category called JFreeChart and add a component like ChartPanel to the category.

I started by adding the jars for JFreeChart to my project, then entered the palette manager and added a category. Then I added a component and typed the full name of a JPanel implementation component, org.jfree.chart.ChartPanel, into the "Choose" screen. In the choose screen it shows a green matching items for the component, but when I click ok and go back to the add component screen I get an error stating "java.lang.ClassNotFoundException: org.jfree.chart.ChartPanel".

I feel as though I must be missing something pretty simple, but I can't seem to figure out what it is. Anyone out there with some insight?
Re: problem adding component to palette [message #1222503 is a reply to message #1222127] Fri, 20 December 2013 11:00 Go to previous message
Eric Clayberg is currently offline Eric Clayberg
Messages: 847
Registered: July 2009
Location: Boston, MA
Senior Member
I gave JFreeChart a try and was able to add it to the palette and then use it without any problem. A ClassNotFoundException typically means some sort of classpath problem, so make sure you have all of the needed jars on your classpath, and that you can find ChartPanel using the Eclipse Open Type dialog. In the palette manager Choose screen, you should be selecting the ChartPanel from the list and clicking ok.

You could also try the Import Jar option as an alternative. Note that JFreeChart does not provide a proper manifest listing its components, so you would need to manually select any components you want to use. ChartPanel is also not a valid Java Bean as it does not define a default constructor. You will need to do some hand coding in order to hook it up properly once you add it to the layout.
Previous Topic:Can you snap a Swing container to minimum size using WindowBuilder?
Next Topic:How to create JTree with checkbox node in window builder?
Goto Forum:
  


Current Time: Wed Jul 23 10:16:12 EDT 2014

Powered by FUDForum. Page generated in 0.01871 seconds