I do get the price from the user but I want to filter the digits and puts, in each 3 digits like 123,123,123.
txtPrice.textProperty().addListener((observable, oldValue, newValue) -> {
if (!newValue.matches("\\d*")){
txtPrice.setText(newValue.replaceAll("[^\\d]",""));
}
});