Substance client properties

View all API methods.

View all client properties.

Client property name



Property name for specifying that extra UI elements (such as menu items in system menu or lock borders) should be shown. This property can be set as a global setting on UIManager or as a client property on a specific component. The value should be either Boolean.TRUE or Boolean.FALSE.

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.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

import org.pushingpixels.lafwidget.LafWidget;
import org.pushingpixels.substance.api.SubstanceLookAndFeel;

 * Test application that shows the use of the
 {@link SubstanceLookAndFeel#SHOW_EXTRA_WIDGETS} client property.
 @author Kirill Grouchnikov
 @see SubstanceLookAndFeel#SHOW_EXTRA_WIDGETS
public class ShowExtraWidgets extends JFrame {
   * Creates the main frame for <code>this</code> sample.
  public ShowExtraWidgets() {
    super("Show extra widgets");

    this.setLayout(new BorderLayout());

    JPanel centerPanel = new JPanel(new FlowLayout());
    final JTextField readOnlyTextField = new JTextField("read-only");

    this.add(centerPanel, BorderLayout.CENTER);

    JPanel controls = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    final JCheckBox showExtraWidgets = new JCheckBox("show extra widgets");
    showExtraWidgets.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            // based on the checkbox selection status, set the
            // property
    this.add(controls, BorderLayout.SOUTH);


   * The main method for <code>this</code> sample. The arguments are ignored.
   @param args
   *            Ignored.
  public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        SubstanceLookAndFeel.setSkin(new BusinessBlackSteelSkin());
        new ShowExtraWidgets().setVisible(true);

The screenshot below shows an uneditable text field when this property is not set:

The screenshot below shows system menu when this property is set to Boolean.TRUE. Note the lock icon in the bottom-left corner of the text field: