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 / GUI / December 2003

Tip: Looking for answers? Try searching our database.

Creating a bar chart application

Thread view: 
Dj Frenzy - 02 Dec 2003 22:59 GMT
Hi,
 I want to create a bar chart inside a JPanel for my Java application
(which is contained in a JFrame). The bar chart will simply create a
bar chart, showing values for 5 fields. These values will not be known
before the program is started.

  Each bar which is drawn must have the ability to implement a
MouseListener so that when the user clicks on the bar, it will open up
another frame.

  What would be the best method to do this? Are there classes in the
javax.swing package that will allow me to do this, or do I have to use
those in the AWT package? I'm new to GUI's so I'm not sure which is
best to use?

Cheers,
Dave
Jaume - 04 Dec 2003 22:23 GMT
look at RChart, the source code is available at a very low cost:

http://www.java4less.com/charts_e.htm

> Hi,
>   I want to create a bar chart inside a JPanel for my Java application
[quoted text clipped - 13 lines]
> Cheers,
> Dave
Erik Mautsch - 23 Dec 2003 09:11 GMT
>    What would be the best method to do this? Are there classes in the
> javax.swing package that will allow me to do this, or do I have to use
[quoted text clipped - 3 lines]
> Cheers,
> Dave

http://www.jfree.org/jfreechart/index.html

You can generate your chart by hardcoded values / or by values from a
database.
I tried both of them.

HTH
Regards
Erik


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



©2009 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.