JComboBox to list age

后端 未结 4 1149
旧时难觅i
旧时难觅i 2020-12-07 05:12

Purpose: JComboBox to list down ages that a user can select

I realize that I need an array of integers. What part of the Math functions in Java will allow me to easi

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-07 05:59

    I suspect a JSpinner using a SpinnerNumberModel would be a better component for selecting an integer based age or Y.O.B. See How to Use Spinners in the tutorial for more info.

    3 spinners

提交回复
热议问题