This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Drawing a graph in jsp page

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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.
 
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out JFreeChart and Cewolf.
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Anything worth doing well is worth doing poorly first. Just look at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!