How to visually display b-tree in java?

I am implementing a B-Tree and would like to display it in a simple user interface (or text output) for debugging. In which library would you recommend doing this as quickly as possible?

It’s just a debugging tool, it should be as simple as possible - I don’t want to spend time exploring the complex user interface infrastructure just for that. If you know something that will print it in STDOUT, that's fine too.

+3
source share
3 answers

Graphviz is easy to use.

+4
source
+1

I think you are wasting your time using the idea of ​​visualization for debugging. Instead, you should have a method that checks the entire tree for correctness (and describes the context of errors in great detail).

Then, during testing, call this method after each step that changes the tree structure. Thus, it is relatively easy to identify errors - and probably faster than viewing a visual presentation.

+1
source

Source: https://habr.com/ru/post/1783128/


All Articles