I have a swing application already developed and running. I am not a seasoned swings developer, but understand the basics.
We have XML config file that has information flow configuration. For example if information flows from A - > B -> C.
I want to extend this swing application and draw a chart at runtime by reading this config file that will diagramatically show that information is flowing from A to B to C.
Maybe drawing can be like 3 circles connected with Arrows.
I want to know what all technologies will be required within Swings space which I should look at and what options I have to draw something at runtime using information from the config file. Any 3rd party frameworks if required, please tell that as well.
You can extend a regular JPanel, override its paintComponent method* and do any custom painting on the supplied Graphics object. It's (almost?) always an instance of Graphics2D, so if you need any methods specific to that class you can cast the argument. Use instanceof to avoid any ClassCastExceptions.
* Please be careful:
1) the first statement inside the overridden method should be super.paintComponent(g)
2) keep the method protected
Search the web for a free or commercial package that provides an API for drawing arrows
Write one yourself.
There are no new questions, but there may be new answers.
Joined: Jun 18, 2003
If we see tools like eclipse, there are various plugins that draw beautiful class diagrams or dependency diagrams. Is that done using raw code inside the plugin, or there is some standard api / library to do this.
I am not able to find something suitable, hence thought of asking swing experts. If you know one, please let me know.