6.3.5. Custom Tree Models
In the final example, we implement a program that inspects the contents of an object, just like a debugger does (see Figure 6.34).
Before going further, compile and run the example program. Each node corresponds to an instance field. If the field is an object, expand it to see its instance fields. The program inspects the contents of the frame window. If you poke around a few of the instance fields, you should be able to find some familiar classes. You’ll also gain some respect for how complex the Swing user interface components are under the hood.
What’s remarkable about the program ...