Results 1 to 3 of 3
  1. #1
    mike_ledis is offline Member
    Join Date
    Mar 2010
    Rep Power

    Default Visuallizing Trees

    Hello! I am trying to implement and visualize huffman compression algorithm. Does anyone knows an api for visualizing binnary trees;

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power

    Default Re: Visuallizing Trees

    Visualizing a binary tree isn't that difficult: the root of the tree is at the top middle of the page/window/jpanel; the left sub-tree takes the left part of the page/window/whatever and the right sub-tree takes up the right part. The roots of the left/right sub-trees are drawn below the root of the tree. Apply this recursively and voila.

    kind regards,

    Build a wall around Donald Trump; I'll pay for it.

  3. #3
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Rep Power

    Default Re: Visuallizing Trees

    You could use a 3rd party library like JUNG, but in my opinion doing so would get you so bogged down with getting familiar with the API that it would probably be much faster taking JosAH's advice.

Similar Threads

  1. HELP!! Binary trees
    By Get_tanked in forum New To Java
    Replies: 4
    Last Post: 03-24-2011, 07:09 PM
  2. Red/Black Trees
    By f1gh in forum New To Java
    Replies: 4
    Last Post: 12-12-2010, 03:30 AM
  3. Binary trees
    By girgishf in forum Advanced Java
    Replies: 15
    Last Post: 11-20-2010, 05:29 PM
  4. Splay Trees
    By Growler in forum New To Java
    Replies: 0
    Last Post: 11-02-2010, 03:10 PM
  5. Need help with Trees...(8-puzzle)
    By ventrue in forum New To Java
    Replies: 2
    Last Post: 03-24-2009, 12:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts