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.wpf
  • 15,045
  • 33
  • 131
  • 226

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
  • 33,550
  • 9
  • 128
  • 139
1

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

Uluk Biy
  • 47,637
  • 12
  • 140
  • 151