# Substance client properties

View all API methods.

View all client properties.

Client property name | SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND

Description | Client property name for specifying the content pane border kind. This property can be specified either on a single `JTabbedPane` or on `UIManager`. The value should be one of `SubstanceConstants.TabContentPaneBorderKind` enum. By default, the border kind is `SubstanceConstants.TabContentPaneBorderKind.DOUBLE_FULL`.

See also |

Sample code | `import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*;
import org.jvnet.substance.SubstanceLookAndFeel;
import org.jvnet.substance.api.SubstanceConstants.TabContentPaneBorderKind;
import org.jvnet.substance.skin.SubstanceBusinessBlackSteelLookAndFeel;
/**
* Test application that shows the use of the {@link
* SubstanceLookAndFeel#TABBED_PANE_CONTENT_BORDER_KIND} client property.
*
* @author Kirill Grouchnikov
* @see SubstanceLookAndFeel#TABBED_PANE_CONTENT_BORDER_KIND
*/
public class TabbedPaneContentBorderKind extends JFrame {
/**
* Creates the main frame for <code>this</code> sample.
*/
public TabbedPaneContentBorderKind() {
super("Tabbed pane content border kind");
this.setLayout(new BorderLayout());
// create tabbed pane with a few tabs
final JTabbedPane jtp = new JTabbedPane();
String packageName = MenuGutterFillKindProperty.class.getPackage()
.getName();
jtp.addTab("First", new ImageIcon(MenuGutterFillKindProperty.class
.getClassLoader().getResource(
packageName.replace('.', '/') + "/flag_mexico.png")),
new JPanel());
jtp.addTab("Second", new ImageIcon(MenuGutterFillKindProperty.class
.getClassLoader().getResource(
packageName.replace('.', '/') + "/flag_sweden.png")),
new JPanel());
jtp.addTab("Third", new ImageIcon(MenuGutterFillKindProperty.class
.getClassLoader().getResource(
packageName.replace('.', '/') + "/flag_hong_kong.png")),
new JPanel());
this.add(jtp, BorderLayout.CENTER);
JPanel controls = new JPanel(new FlowLayout(FlowLayout.RIGHT));
final JComboBox contentBorderCombo = new JComboBox(new Object[] {
TabContentPaneBorderKind.DOUBLE_FULL,
TabContentPaneBorderKind.SINGLE_FULL,
TabContentPaneBorderKind.DOUBLE_PLACEMENT,
TabContentPaneBorderKind.SINGLE_PLACEMENT });
contentBorderCombo
.setSelectedItem(TabContentPaneBorderKind.DOUBLE_FULL);
contentBorderCombo.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
TabContentPaneBorderKind contentBorderKind = (TabContentPaneBorderKind) contentBorderCombo
.getSelectedItem();
jtp.putClientProperty(
SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND,
contentBorderKind);
jtp.updateUI();
jtp.repaint();
}
});
controls.add(new JLabel("Content border kind"));
controls.add(contentBorderCombo);
this.add(controls, BorderLayout.SOUTH);
this.setSize(400, 200);
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
/**
* The main method for <code>this</code> sample. The arguments are ignored.
*
* @param args
* Ignored.
* @throws Exception
* If some exception occured. Note that there is no special treatment
* of exception conditions in <code>this</code> sample code.
*/
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());
JFrame.setDefaultLookAndFeelDecorated(true);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new TabbedPaneContentBorderKind().setVisible(true);
}
});
}
}`

The screenshot below shows tabbed pane with top placement and default (double full) content border kind - this property is not specified:

The screenshot below shows tabbed pane with top placement and `SubstanceConstants.TabContentPaneBorderKind.SINGLE_FULL` content border kind:

The screenshot below shows tabbed pane with top placement and `SubstanceConstants.TabContentPaneBorderKind.DOUBLE_PLACEMENT` content border kind:

The screenshot below shows tabbed pane with top placement and `SubstanceConstants.TabContentPaneBorderKind.SINGLE_PLACEMENT` content border kind: