java - JAVAFx TextField Validation Decimal value -


i try restrict textfield decimal numbers, found solution integer number validation here, problem not able convert following code decimal numbers, 324.23, 4.3, 4, 2, 10.43. (only 1 decimal point allow).

 vendorlist_textfield_remaining.textproperty().addlistener(new changelistener<string>() {         @override         public void changed(observablevalue<? extends string> observable, string oldvalue, string newvalue) {             if (!newvalue.matches("\\d*")) {                 vendorlist_textfield_remaining.settext(newvalue.replaceall("[^\\d||.]", ""));             }         }     }); 

i looking alternative solutions. thanks.

there excellent field validation components in jidefx-oss project, including 1 decimal numbers.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -