Linked Questions
15 questions linked to/from Java 8 U40 TextFormatter (JavaFX) to restrict user input only for decimal number
0 votes
0 answers
968 views
How to limit input length in JFX textField? [duplicate]
I need to limit input length to 4 digits in JFX textField (field can be empty or have value 0-9999). Below solution works only partially - I can input only digits , but as many as i want - limit do ...
0 votes
0 answers
22 views
javafx Text in Textfield won't update while editing it [duplicate]
I want to make sure that the user can only write Numbers in the text field. But whenever I call textfield.setText(oldValue);, it won't update the text in the text field (it's not deleting the invalid ...
108 votes
24 answers
204k views
What is the recommended way to make a numeric TextField in JavaFX?
I need to restrict input into a TextField to integers. Any advice?
21 votes
4 answers
38k views
Numeric TextField for Integers in JavaFX 8 with TextFormatter and/or UnaryOperator
I am trying to create a numeric TextField for Integers by using the TextFormatter of JavaFX 8. Solution with UnaryOperator: UnaryOperator<Change> integerFilter = change -> { String ...
15 votes
2 answers
1k views
Escape from a Number TextField in a JavaFX dialog
I've a custom dialog with several UI elements. Some TextFields are for numeric input. This dialog does not close when the escape key is hit and the focus is on any of the numeric text fields. The ...
4 votes
1 answer
10k views
String with numbers and letters to double javafx
Hi I am trying to read a the numbers from a text field that shows a price e.g. £3.00, and convert the value of the price to a double. Is there a way to do Double value; value = Double.parseDouble(...
3 votes
3 answers
2k views
Seprating the digits in the textfiled while entering the numbers (Javafx)
I created a simple javafx program. I want to seprate the digits three by three when I entering the digits in the textfiled. I used two solution which are given in the stackoverflow links(How to format ...
3 votes
3 answers
4k views
JavaFX TextField validation for integer input and also allow either K or k(for Thousand) or M or m(for Million) in last
I want to add validation in javafx TextField such that user should only be able to insert integer values ([0-9] and Dot ). Also user should be able to insert either B or b(for Billion) and K or k (for ...
0 votes
1 answer
4k views
Calling a method with parameters in javafx´s scenebuilder
I started coding two weeks ago and I´m trying java higgledy-piggledy. I wrote a Java Fibonacci Sequence program, which let´s you select the start of your sequence and the length. I build my first ...
2 votes
1 answer
5k views
How to format text of TextField? JavaFX
For example, if I enter 32164578542324236.97325074, this number should be displayed in a TextField like 32,164,578,542,324,236.97325074. I tried to handle this, but unsuccessfully: inputField....
0 votes
1 answer
673 views
Javafx: fail to display content properly in table cell
I have the following Trade object class. public class Trade implements Comparable<Trade>{ // attributes of each trade that go into the tableViewTransaction log // properties ...
0 votes
0 answers
815 views
ReadOnly Text Area with Scroll in JAVAFX
in my JAVA FX application I am using TextArea to display certain text content. I am using following property to restrict editing: templateScriptArea.setEditable(false); With this, user is not able to ...
-1 votes
1 answer
831 views
javafx: how to addEventHandler for javafx textfield for validating time
I have hard time finding any guides on how to addEventHandlerfor textfield so that it does real time validation from key inputs to only allow hh:mm time format. I found this expression ^([0-9]|0[0-9]|...
1 vote
1 answer
593 views
JavaFX can't catch exception in the edit commit function
I'm having trouble figuring out how to catch an exception in the setOnEditCommit() function. TableColumn<Property, Float> value_clm = new TableColumn<Property, Float>("Value"); value_clm....
0 votes
1 answer
143 views
What is a listener and how implement it on a JavaFX TextField?
I was browsing here on StackOverflow a solution to a problem: essentially I want the TextField to limit user input to just numeric values/ integers. I have found an answer that mentions a listener: ...