01: package test;
02:
03: import java.awt.BorderLayout;
04:
05: import javax.swing.JPanel;
06: import javax.swing.JScrollPane;
07:
08: import org.jdesktop.swingx.JXTreeTable;
09: import org.jdesktop.swingx.treetable.FileSystemModel;
10: import org.jdesktop.swingx.treetable.TreeTableModel;
11:
12: public class TreeTablePanel extends JPanel {
13: public TreeTablePanel() {
14: this .setLayout(new BorderLayout());
15:
16: TreeTableModel treeTableModel = new FileSystemModel();
17: JXTreeTable treeTable = new JXTreeTable(treeTableModel);
18: JScrollPane scrollpane = new JScrollPane(treeTable);
19:
20: this.add(scrollpane, BorderLayout.CENTER);
21: }
22:
23: }
|