in java, how to draw automata

automata expression-trees finite-automata java swing

Question

i want to draw an automata with edges and circulaire states, something like this http://pop-art.inrialpes.fr/~girault/Cours/Automates/td5.html, have u an example for that

1
5
4/28/2012 12:35:17 AM

Accepted Answer

JGraph is a library you can use that is native to Java and fairly easy to use, or you can generate a .dot file and let GraphViz take care of it for you.

7
4/28/2012 2:01:01 AM

Popular Answer

If you dont want to carry for things like representing the graph in a correct way such you try to not cross the lines, or to not have two or more nodes in the same position then i suggest you to use grail graph library so you can see the graph using yed works (I can provide you an example of it just write the regular expression you in comment), or if you want to draw the graph by yourself then you probably is good to learn about Layered graph drawing : http://en.wikipedia.org/wiki/Layered_graph_drawing and Coffman Graham algorithm http://en.wikipedia.org/wiki/Coffman%E2%80%93Graham_algorithm



Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow