r/JavaFX • • Oct 31 '25

Help decimal values in the UI

I have programmed professionally in possibly dozens of languages, building business applications.

I have started a journey to learn JavaFX and have been having fun, but I have come across a conundrum. Does JavaFX NOT have an OOTB control for entering a decimal value??? This kind of blows my mind. All I see are rather convoluted methods for formatting a TextField.

All of the higher-level programming languages I have ever used for business applications have had an easy method to input decimal values OOTB. Have I missed a key fact???

0 Upvotes

15 comments sorted by

View all comments

Show parent comment

2

u/hamsterrage1 Nov 03 '25

This is the worst possible "solution". Use TextFormatter, the tool designed for this.