1、idea打开javafx项目

2

3、运行并启动程序,打开一个窗口
4、有一个下拉框

5、定位到主程序中

6、修改代码

7、查看效果

1、1.ChoiceBox choiceBox = new ChoiceBox();
choiceBox.setItems(FXCollections.observableArrayList("数学","语文",new Separator(),"英语","地理"));
1、idea打开javafx项目

2

3、运行并启动程序,打开一个窗口
4、有一个下拉框

5、定位到主程序中

6、修改代码

7、查看效果

1、1.ChoiceBox choiceBox = new ChoiceBox();