Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2007

Tip: Looking for answers? Try searching our database.

XYImageAnnotation in JFreechart

Thread view: 
Penn - 14 Sep 2007 15:59 GMT
I have a plot that is plotting correctly and I have been adding text
annotations to it successfully, but when I implement the following and
add it to my working chart... I see no image in the chart.  Is there
something I should be doing additionally?

Thanks!!!

ImageIcon testStar = new ImageIcon("TestStar.png");

XYImageAnnotation testStar = new XYImageAnnotation(50, 50,
testStar.getImage());

plot.addAnnotation(testStar);
Steve W. Jackson - 14 Sep 2007 17:01 GMT
> I have a plot that is plotting correctly and I have been adding text
> annotations to it successfully, but when I implement the following and
[quoted text clipped - 9 lines]
>
> plot.addAnnotation(testStar);

The most obvious questions would seem to be two.

1.  Are you quite certain that the PNG in question really does get
loaded when you ask for it?

2.  Does your "plot" variable in fact refer to a class that has the
addAnnotation method?  By which I mean that I've seen some products
where a deprecated method doesn't really do anything, and at least one
of the classes in JFreeChart where this method is listed is deprecated.
Signature

Steve W. Jackson
Montgomery, Alabama

Penn - 14 Sep 2007 17:58 GMT
Thank you for the 'obvious questions', because obvious guidance was
needed here.  My ImageIcon was not loading correctly...  It is now and
JFreeChart is placing it appropriately!

Thank you and I really appreciate your time!

On Sep 14, 9:01 am, "Steve W. Jackson" <stevewjack...@knology.net>
wrote:
> In article <1189781964.884404.5...@d55g2000hsg.googlegroups.com>,
>
[quoted text clipped - 24 lines]
> Steve W. Jackson
> Montgomery, Alabama


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.