Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JavaFX
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
JavaFX
ComboBox Object not initializing in Eclipse Scene Builder
AhFai Chan
Ranch Hand
Posts: 271
1
I like...
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
QUESTION: How to initialize ComboBox using Scene Builder in Eclipse ???
ANSWER: like this
public void initialize() { // <== return to basic, took out the parameters pizzaOrderLabel.setText(""); // Initialize ComboBox.................................. comboBox.getItems().clear(); comboBox.getItems().addAll("Barbera", // <== return to basic, just use a getItems.addAll() "Blauburgunder", "Brunello", "Cabernet Sauvignon", "Grenache", "Grignolino", "Kalterersee Auslese", "Malbec", "Syrah"); comboBox.setValue("Syrah"); } }
Also, ComboBox does not support multiple selection model.
Instead, I used a ListView.
AhFai Chan
Ranch Hand
Posts: 271
1
I like...
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Okay, I found out how to initialize the ComboBox:
public void initialize() { // <== return to basic, took out the parameters pizzaOrderLabel.setText(""); // Initialize ComboBox.................................. comboBox.getItems().clear(); comboBox.getItems().addAll("Barbera", // <== return to basic, just use a getItems.addAll() "Blauburgunder", "Brunello", "Cabernet Sauvignon", "Grenache", "Grignolino", "Kalterersee Auslese", "Malbec", "Syrah"); comboBox.setValue("Syrah"); } }
Now I need to figure out how to get eclipse Scene Builder to do
MultipleSelectionModel<
String
>
.
Would be very nice to know the WHY's and WHEREFOR's though...
ANSWER: Use a ListView instead of a ComboBox and set the selection model to(SelectionMode.MULTIPLE)
Screaming fools! It's nothing more than a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
When using JavaFX, what replaces MVC?
Problems with eclipse Jalopy plug-in
websphere app server toolkit and eclipse plugins
I Seriously Need Helps.. Ugently
About your book
More...