Meaningless Drivel is fun!*
The moose likes Applets and the fly likes creating  graph using Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "creating  graph using Applet" Watch "creating  graph using Applet" New topic
Author

creating graph using Applet

venu_74
Greenhorn

Joined: Jul 26, 2001
Posts: 1
i have to create graph with Excel data. for this i hope Applet is the right one to do, but i don't know how to do it, if any one know how to create a graph using the data in the database, please help me to do this.
thanks to all if u consider my request
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

"venu_74"
your name doesn't agree with the javaranch guidelines.
please take a moment and re-register yourself after
selecting a valid name following the guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

To create an applet to graph with Excel data is a big task, because it involves so many things.

  • Getting the data out of the Excel file. This would be done via JDBC.
  • Graphing the data. This is easier. Once you get the data out of the Excel file, you'll simply need to iterate through the entire dataset drawing lines between each point if you want a line graph, or drawing filled arc if you want a pie chart. This would be done in the paint() method of the applet.
  • The applet part. Several issues related to this... Is the Excel file on the server or on the client's machine? If it is on the client's machine, you will have to have a signed applet, capability classes, or some other procedure to break out of the applet 'sandbox'. Plus, I'm not sure how JDBC & applets get along... I know it can be done, but I don't know if it requires extra measures to work...


  • Just some thoughts...

    HTH,
    -Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating graph using Applet