0

In my application the users needs to be able to enter a duration, consisting of minutes and seconds.

I am thinking of something like the control used in Windows to change the time, though I only need minutes and seconds and also the arrows would be nice, but are not necessary.

  • Is there already a control for this in JavaFX 2?
  • If not, how can I create such a control?

A screenshot of the mentioned Windows control:

enter image description here

Thanks for any hint!

stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270

2 Answers2

1

Unfortunately there is no such control in standard JavaFX 2.

Although you can try to look at Spinner control from JFXtras project: http://jfxtras.org/

And intergrate it with TextEdit filtering approach described here: What is the recommended way to make a numeric TextField in JavaFX?

Community
  • 1
  • 1
Sergey Grinev
  • 34,078
  • 10
  • 128
  • 141
1

Nice implementation of spinner, though you need to adjust it to handle time inputs.
JavaFX NumberTextField and Spinner Control.

Uluk Biy
  • 48,655
  • 13
  • 146
  • 153