Linked Questions

0 votes
0 answers
968 views

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 ...
Mic's user avatar
  • 49
0 votes
0 answers
22 views

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 ...
Carl's user avatar
  • 25
108 votes
24 answers
204k views

I need to restrict input into a TextField to integers. Any advice?
Harry Mitchell's user avatar
21 votes
4 answers
38k views

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 ...
ShadowEagle's user avatar
15 votes
2 answers
1k views

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 ...
rubpa's user avatar
  • 183
4 votes
1 answer
10k views

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(...
S.Rose's user avatar
  • 41
3 votes
3 answers
2k views

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 ...
Sameer's user avatar
  • 85
3 votes
3 answers
4k views

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 ...
Vivek Rawat's user avatar
0 votes
1 answer
4k views

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 ...
user avatar
2 votes
1 answer
5k views

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....
void's user avatar
  • 761
0 votes
1 answer
673 views

I have the following Trade object class. public class Trade implements Comparable<Trade>{ // attributes of each trade that go into the tableViewTransaction log // properties ...
mynameisJEFF's user avatar
  • 4,259
0 votes
0 answers
815 views

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 ...
Sandeep Kokate's user avatar
-1 votes
1 answer
831 views

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]|...
Mārtiņš Ciekurs's user avatar
1 vote
1 answer
593 views

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....
Daniel Zamilatskiy's user avatar
0 votes
1 answer
143 views

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: ...
Loader's user avatar
  • 1