bindSpinners

fun bindSpinners(min: JSpinner, max: JSpinner, maxRange: Double? = null)(source)

Binds two spinners that form a range of valid values together.

This function adds listeners to the spinners so that if one spinner's value is adjusted, the other's value is also adjusted if not doing so would make the range invalid. Specifically, this function guarantees that min never exceeds max, and that the difference between min and max never exceeds maxRange.