public void start(final Stage frame) throws Exception {
String[] locales = Locale.getISOCountries();
for (String countrylist : locales) {
Locale obj = new Locale("", countrylist);
String[] city = {obj.getDisplayCountry()};
for (int x = 0; x < city.length; x++) {
cities = FXCollections.observableArrayList(obj.getDisplayCountry());
country = new ComboBox<String>(cities);
}
}
}
I want to display the country list using Locale class. However I only manage to display one country in the Combobox when I run the code. I am not sure whether I got the loop wrong or what.