组合框项目中的随机字符而不是字符串输入?

Random characters instead of String input in Combobox Items?

我正在尝试使用 IntelliJ 中的 javafx/scenebuilder 在我的应用程序中创建一个选择框,但到目前为止我无法让字符串显示为菜单项 - 在下面的示例屏幕截图中我刚刚尝试创建一个带字母C的选项?我使用的代码如下。知道我做错了什么吗?我认为这可能是字体问题,但我找不到更改菜单项字体的方法。

<AnchorPane prefHeight="45.0" prefWidth="127.5">
               <children>
                  <Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="I" AnchorPane.leftAnchor="11.0" AnchorPane.topAnchor="4.0">
                     <font>
                        <Font name="Courier Bold" size="40.0" />
                     </font>
                  </Text>
                  <ChoiceBox fx:id="keyChoice" prefWidth="79.0" style="-fx-background-color: #FBC5B8;" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="8.0">
                      <items>
                          <FXCollections fx:factory="observableArrayList">
                              <String fx:value="C" />
                          </FXCollections>
                      </items>
                  </ChoiceBox>
               </children>
            </AnchorPane>

所以怀疑是字体问题,找不到在 FXML 中更改它的方法,因此创建了一个工作正常的 CSS 文件。

.choice-box .menu-item .label {
-fx-font-family: "monospace";
}

.choice-box {
-fx-font-family: "monospace";
}