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!

4

2 回答 2

1

不幸的是,标准 JavaFX 2 中没有这样的控制。

虽然您可以尝试Spinner从 JFXtras 项目中查看控制:http: //jfxtras.org/

并将其与此处描述的 TextEdit 过滤方法集成:What is the recommended way to make a numeric TextField in JavaFX?

于 2012-10-17T14:36:13.103 回答
1

微调器的良好实现,尽管您需要对其进行调整以处理时间输入。
JavaFX NumberTextField 和 Spinner 控件

于 2012-10-17T14:48:47.193 回答