• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Drawing a graph in jsp page

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
i working on a project for university that consist in a Web Graph Visualizator using java and jsp, in few word in a first step i analize a file (xml based) with my java parser and i build the tree\graph structure and then i need to draw the graph (or tree^^) in the web page.
i searched a little on web and i found JGraph drawing component but it seems to be able to draw a graph only in a jframe and dont give the functionality for web.
Moreover i dont know if its possible to embed the jframe created with jgraph in a html\jsp page.
Someone know if is possible and how i can make it, or simply if exist another way (library, tag-library, framework) to draw my graph in a webpage?

all suggestion al welcome
tnx in advice.
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out JFreeChart and Cewolf.
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's probably a way to make JGraph save the graph to a file. If that's a GIF/JPEG/PNG file, then you can reference it in your web app in an <IMG...> tag.
(And no, you can't embed a JFrame in a web page - unless you want to use an applet, but it doesn't sound like you would.)
 
stefano corna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tnx for answers.
@Bear Bibeault i think jFreeChart and Cewolf are only to draw charts and not for a tree structure (nodes + arc)
@Lester Burnham now i check if is possible save to file i htink is the easier way if is not possible i think i must create a file, easy to parse, with tree structure and use ajax+some javascript framework to draw the tree
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic