List of usage examples for javafx.scene.control Accordion setExpandedPane
public final void setExpandedPane(TitledPane value)
The expanded TitledPane that is currently visible.
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group g = new Group(); Scene scene = new Scene(g, 550, 250, Color.web("0x0000FF", 1.0)); TitledPane t1 = new TitledPane("T1", new Button("B1")); TitledPane t2 = new TitledPane("T2", new Button("B2")); TitledPane t3 = new TitledPane("T3", new Button("B3")); Accordion accordion = new Accordion(); accordion.getPanes().addAll(t1, t2, t3); accordion.setExpandedPane(t1); g.getChildren().add(accordion);// www . j a va 2s. c om primaryStage.setScene(scene); primaryStage.show(); }