addLibrary() in org.jfree.ui.about.ProjectInfo

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
hugo
Posts: 7
Joined: Wed Jun 23, 2004 12:09 pm

addLibrary() in org.jfree.ui.about.ProjectInfo

Post by hugo » Wed Jun 23, 2004 2:02 pm

I posted already today with a problem which, (as I already said) I suspect is trivial and annoying to experienced users. However I still am having problems and I have an important prototype deadline approaching and I would like to use JFreeGraph in the product.

Currently I believe the source of the problem is the JFreeChartInfo class and the following line

addLibrary(JCommon.INFO); //line #1481

my environment tells me that it cannot resolve the symbol method addLibrary() (org.jfree.ui.about.ProjectInfo)

I presume Java looks for addLibrary in JFreeChartInfo and doesn't find it, then looks for it in the superclass ProjectInfo where it doesn't find it either. And it s right (I think) becuse neither class contains a method of that name.

Any suggestions would be greatly appreciated.

Stacey
Posts: 15
Joined: Tue Jan 27, 2004 5:09 pm

Post by Stacey » Wed Jun 23, 2004 5:18 pm

I inquired about this same problem. The "fix" is listed in the JCommon forum.
http://www.jfree.org/phpBB2/viewtopic.php?t=9156

hugo
Posts: 7
Joined: Wed Jun 23, 2004 12:09 pm

Post by hugo » Thu Jun 24, 2004 10:53 am

I don't see the relationship between your previous post & fix and mine yet. Could you help?

hugo
Posts: 7
Joined: Wed Jun 23, 2004 12:09 pm

Post by hugo » Thu Jun 24, 2004 10:57 am

I have commented out the

addLibrary(JCommon.INFO);

line and the demos work. If there is any concrete reason that anybody knows of that I should not do this could they please let me know.

Stacey
Posts: 15
Joined: Tue Jan 27, 2004 5:09 pm

Post by Stacey » Thu Jun 24, 2004 4:26 pm

Maybe I misunderstood your problem to begin with, but the previous post I suggested talks about jcommon/jfreechart version mixing. If the wrong version of jcommon is being used with jfreechart, this is an error you will find. I'd double check that your api(s) are compatible.
As for commenting the line out...a better solution may be to replace that section with (which is the older version stuff):

Code: Select all

setLibraries(Arrays.asList(
                  addLibrary(JCommon.INFO);
                  new Library[]{
                        new Library(JCommon.INFO)
                  }
)); 
I could be completely wrong too, but I hope this may help. Good luck!

Locked