I have the same problem. This seems like a mistake. The following is a complete working example with a ComboBox that contains Locale s:
package org.example; import java.util.Arrays; import java.util.List; import java.util.Locale; import javafx.application.Application; import javafx.event.EventHandler; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; import javafx.stage.Stage; import javafx.util.StringConverter; public final class ComboBoxTest extends Application { @Override public void start(final Stage stage) throws Exception {
When the ComboBox fills up for the first time, everything works fine: the ComboBox contains all 3 Locale , and the second Locale installed.

After filling the second time, ComboxBox.setValue does not work: ComboBox contains all 3 Locale , but the second Locale not installed. The item is not selected, and the prompt is not displayed.

I fixed the problem with
// Set default locale cbLocales.setValue(defaultLocale); cbLocales.setPromptText(cbLocales.getConverter().toString( cbLocales.getValue()));
but it does not select an item in the list:

It works like this:
cbLocales.getSelectionModel().select(defaultLocale); cbLocales.setPromptText(cbLocales.getConverter().toString(cbLocales.getValue()));
To select an item and set an invitation. But I do not know if there are problems with this (tool tips or similar)
source share