When you open a XML in Eclipse, the content can be shown in as a tree structure like
SwingX has a JXTreeTable, it's based on but much improved over the oldish examples (links to sun code/article) cited by @mKorbel
Check the following:
You could try subclassing JTable and making your own custom renderer with behavior that adds/removes new rows when you expand/collapse a node.