JAccordion is a themed wrapper around JavaFX’s Accordion control. It provides a container for multiple JAccordionPane components, allowing only one pane to be expanded at a time.
// Create accordion with panesJAccordion accordion = new JAccordion();// Add panesaccordion.getPanes().addAll( new JAccordionPane("Section 1", new Label("Content 1")), new JAccordionPane("Section 2", new Label("Content 2")), new JAccordionPane("Section 3", new Label("Content 3")));// Set initially expanded paneaccordion.setExpandedPane(accordion.getPanes().get(0));// Using constructorJAccordion accordion = new JAccordion( new JAccordionPane("Section 1", new Label("Content 1")), new JAccordionPane("Section 2", new Label("Content 2")));