feech
feech

Reputation: 424

JavaFx instance in FXML

I try fxml feature in javaFX

  1. how to specify a title while creating TabedPane? the code below don't work

    <Accordion >
            <panes>
                <TitledPane>
                    <title>
                        <String fx:value="123"/>
                    </title>
                    <content>
                        <Text text="123"/>
                    </content>
    
                </TitledPane>
            </panes>
        </Accordion>
    

2 how to instantiate Duration for animation?

<Duration><Double fx:value="300"/></Duration>

Upvotes: 0

Views: 2030

Answers (1)

feech
feech

Reputation: 424

answer on 2 TitledPane extends Labeled therefore has property text

<TitledPane text="header">
            <content>
                <Text text="123"/>
            </content>

        </TitledPane>

Upvotes: 1

Related Questions