// create and configure a JSidePane component
JSidePane sidePane = new JSidePane();
sidePane.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
// add a tree with a "tree" title
sidePane.addGroup(new JTree(), new ValueAction("tree"));
// add a list with a empty title
sidePane.addGroup(new JList());
// add a tree with a "dir" title
sidePane.addGroup(new JTree(), new ValueAction("dir"));
// add a tree with a "file" title
sidePane.addGroup(new JTree(), new ValueAction("file"));
|