File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes graph Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "graph" Watch "graph" New topic
Author

graph

shalini gnana
Ranch Hand

Joined: Sep 18, 2007
Posts: 189
can anyone say me how to draw a graph by getting x,y co-ordinates(not by calculating the co-ordinates) in applet with scrollpane.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
Here's an example of how to dra an X/Y graph. It doesn't really make a difference whether it's in an applet, or part of a ScrollPane.


Ping & DNS - my free Android networking tools app
shalini gnana
Ranch Hand

Joined: Sep 18, 2007
Posts: 189
In that example the co-ordinates are being calculated..but my requirement is,i have to get both the co-ordinates and have to set tooltip which displays the value when pointing on that co-ordinate
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
i have to get both the co-ordinates


I don't understand what this means. From where are you getting the coordinates?

If you're talking of detecting where the mouse points to, then you need to add a MouseMotionListener. It supplies the code with MouseEvents, which have the X/Y information where the mouse is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: graph