![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
Drawing Trees in with Swing
I want to display a tree in a Java GUI, but I am not sure how to handle the spacing of the nodes as the tree gets deeper. I have the internal representation of the tree. It's no more than simple tree laying out a wireless LAN bridge topography. I now need to display this to the user. I have read that the Canvas class is the best class to use for drawing, but I am fairly new to Java and I am not sure why. Is it set up on Cartesian coordinates? Does anyone have a formula off the top of their head that can calculate the spacing of the nodes so they don't overlap each other?
|
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
I found a nice third party package for this stuff. http://prefuse.org/
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| trees | programmingnoob | C++ | 15 | Nov 2nd, 2006 10:37 PM |
| Java Swing FocusTraversalPolicy | hemanth.balaji | Java | 0 | May 11th, 2006 11:25 PM |
| Swing || AWT Tutorials | Java_König | Java | 2 | Jan 28th, 2006 11:19 PM |
| Keep Drawing Pixels without previous ones cleared. | JavaMan | Java | 4 | Oct 27th, 2005 7:43 PM |
| Swing books? | Mjordan2nd | Java | 0 | Mar 2nd, 2005 8:50 PM |