Is it possible to display of the tree structure of the Java-code?

Right clicking on a method name in NetBeans, you can choose Call Hierarchy. It'll open a window with a tree structure displayed. I think it defaults to the callers view. In the window's toolbar you can switch to the callees view. You will then have a navigable tree view of everything the current method calls. Expanding the tree on a callee will show that methods callees. It's not exactly a diagram but should help.


Not sure about Netbeans, but in eclipse, you can right-click on a method and select "open call hierarchy" to get a tree view of methods that call the method you have selected, and at the top of the view is an icon to reverse this ("Show Callee Hierarchy"), which does pretty much what you want (except it shows only one method's callees at a time).