r/JavaFX • u/travelking_brand • 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???
View all comments
Show parent comment
2
u/No-Security-7518 Nov 21 '25
You sound experienced but Javafx has more colorful controls than one would know what to do with. I literally have "options paralysis" for every other notification I want to have show up.
But I digress, since you expect to have numeric-only text fields, I'd immediately write a class (extending or using TextFormatter (i.e. utility) and just text fields use that. That's the (fun) way to use UI frameworks, imo.