代码之家  ›  专栏  ›  技术社区  ›  Leon Horka

如何在Windows中使用JavaFX创建类似OSX的列表对象?

  •  -4
  • Leon Horka  · 技术社区  · 8 年前

    我在这里找不到与此外观和感觉相同的对象:

    enter image description here

    它不是AWT列表,也不是Swing ComboBox,所以它是什么?

    1 回复  |  直到 8 年前
        1
  •  0
  •   jewelsea    8 年前

    使用选择框。

    ChoiceBox cb = new ChoiceBox(FXCollections.observableArrayList(
        "First", "Second", "Third")
    );
    

    enter image description here