I'm writing a class in Java (Eclipse) which implements a quadtree structure. For those of you who are not familiar with this structure, it is simply a square that gets divided recursively into four other squares as shown in the figure below.

I want to display the data structure as shown below. Does anyone have a nice idea for a simple implementation ?
Thanx
You can use Java's AWT or Swing to create a window and draw the quad tree in there. For example, in Swing you could create a JPanel and do the drawing there. It does not need to be very complicated as it's only a matter of drawing lines and possibly squares.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With