Class TitledPane

All Implemented Interfaces:
Styleable, EventTarget, Skinnable

@DefaultProperty("content")
public class TitledPane
extends Labeled

A TitledPane is a panel with a title that can be opened and closed.

The panel in a TitledPane can be any Node such as UI controls or groups of nodes added to a layout container.

It is not recommended to set the MinHeight, PrefHeight, or MaxHeight for this control. Unexpected behavior will occur because the TitledPane's height changes when it is opened or closed.

Note that whilst TitledPane extends from Labeled, the inherited properties are used to manipulate the TitledPane header, not the content area itself. If the intent is to modify the content area, consider using a layout container such as StackPane and setting your actual content inside of that. You can then manipulate the StackPane to get the layout results you are after.

Example:

 TitledPane t1 = new TitledPane("T1", new Button("B1"));
Image of the TitledPane control
Since:
JavaFX 2.0