Extreme Component

ComponentSet Programmer Guide > JSidePane

JSidePane - Java Group Panel

JSidePane provides a component to add group panel.

Adds group panel

Code Samples:

// 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"));

Single Selection and Multiple Selection

JSidePane component supports single selection mode and multiple selection mode.

Code Samples:

// create and configure a JSidePane component
JSidePane sidePane = new JSidePane();
// sets the single selection mode
sidePane.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
// sets the multiple selection mode
sidePane.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);


Copyright (c) zfqjava.com
All rights reserved.