Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX equivalent of Swing's JSpinner?

I was trying to find a spinner component like JSpinner to use in my JavaFX application but there is no such component.

What JavaFX component do you recommend me to use in place of a spinner?

like image 316
ceklock Avatar asked Dec 07 '12 21:12

ceklock


2 Answers

Update for Java 8

JavaFX 8 has now an in-built Spinner class as part of the core JavaFX library (as mentioned in SWdV's answer to this question).

Old (pre-Java 8) Answer

There is a spinner control in the JFXtras library, you could use that implementation or possibly adapt it to your needs.

A spinner control is proposed for inclusion in a future JavaFX version. The target version is currently unspecified, so perhaps it won't even be released with Java 8. The proposed spinner control has a usability design document. The open-jfx project may accept a quality implementation of the usability design for inclusion into the core JavaFX platform or the JavaFX UI Control Sandbox.

like image 106
jewelsea Avatar answered Oct 10 '22 12:10

jewelsea


JavaFX 8 has a Spinner class. (but earlier versions haven't)

like image 30
SWdV Avatar answered Oct 10 '22 13:10

SWdV