Search code examples
javafxcombobox

JavaFX combo box start value?


I was curious if there is a way to set a start value for a combo box so that it does not start at the topmost value. For example, I have a combo box called cbCurrentWeight with values ranging from 10 all the way to 999. I don't want 99% of users to have to scroll 100-200 numbers so they can select their weight. I would like for the combo box to start at 100 with the option to go higher or lower from there.

I do not want to set a default value for this combo box either.

Would I be better off just using a TextField and adding parameters to ensure users are entering a valid number?


Solution

  • I decided to simply change the value to a minimum of 50lbs. The spinner option was great though, and I got it to work. I just prefer the view of the ComboBox.