Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 29th, 2007, 8:24 AM   #1
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
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?
hoffmandirt is offline   Reply With Quote
Old Feb 22nd, 2007, 3:36 PM   #2
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
I found a nice third party package for this stuff. http://prefuse.org/
hoffmandirt is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:33 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC