Questions tagged [inputverifier]

An InputVerifier validates input in Graphical User Interface (GUI).

In Java, an InputVerifier validates input in Graphical User Interface (GUI). See How to Use the Focus Subsystem: Validating Input for an example.

52 questions
0
votes
0 answers

Generic InputVerifier for ranges

I'm trying to create a generic InputVerifier that checks to see if the data in the JComponent is within a specified range. For this, I made my generic type extend Comparable<> to ensure it could be compared. What I'm getting caught up on is the…
Stealth Rabbi
  • 10,156
  • 22
  • 100
  • 176
0
votes
1 answer

InputVerifier incorrectly yielding focus and need advice using it with other ActionListener methods

I have a GUI in which the user enters measurements into a number of fields and calculates a result based on the measurement. I am trying to implement the following for the fields- The values entered must be in the proper range I have an option…
Jon Swanson
  • 324
  • 3
  • 6
  • 16
0
votes
3 answers

Issue with Component Iteration and validation

Am having a method that check all JTextFields in a panel JPanel to see whether they are empty, am iterating through all the components in the container. in the container i have labels, text fields and combo boxes. So i can be able validate the first…
tmwanik
  • 1,643
  • 14
  • 20
-1
votes
1 answer

InputVerifier stealing focus

I have a problem with an InputVerifier stealing the focus in my app. When I click on the textfield that uses this verifier, I can't click anywhere else unless I fill the field with 4 digits (the verifier is here to prevent anything else than digits…
DevBob
  • 835
  • 2
  • 9
  • 29
-1
votes
1 answer

Creating A JTextField Input Validator

I am trying to create a JTextField input validator following Building a Swing Validation Package with InputVerifier. I have taken all the class on that page an am now trying to use the NotEmptyValidator found here. I have a JFrame and a JTextField.…
CN1002
  • 1,115
  • 3
  • 20
  • 40
-1
votes
1 answer

Input Verifier effect not work by click, just work by tab button

I have a delicate problem! I have a form that set input verifier to text fields, and when user type a incorrect value, other text fields and radio buttons should be disable. In second text filed (last name), When user type a incorrect value, other…
Sajad
  • 2,273
  • 11
  • 49
  • 92
-4
votes
2 answers

Java - Input Verifier

I was just creating this specific but I was a little confused on documenting this. Am just stuck on explaining what the last couple of lines do : class MyVerifier extends InputVerifier { public boolean verify(JComponent input) { if (input==id)…
Eddy
  • 11
  • 1
  • 8
1 2 3
4