53 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
3
votes
3
replies
80
views
Swing tutorial: InputVerifier setup
Below you find the example code for an InputVerifier from the swing tutorial, slightly modified to compile error-free under java 25.
The code creates an InputVerifer (class MyVerifier), which is set ...
1
vote
2
answers
142
views
InputVerifier changes button background
The code below shows just a textfield and a button.
The textfield has got an inputVerifier which doesn't accept an empty field.
As long as the verifier's "false" result is signalled by an ...
2
votes
1
answer
75
views
Prevent a JComboBox popup from appearing. Passing InputVerifier
Given the following scenario:
one has a JComboBox and a JTextField
the latter has an InputVerifier providing its own error message.
the textField is the current focus owner and its input does not ...
0
votes
1
answer
537
views
How do I make the main form show only if the user login is successful from a second form?
I am trying to make a form that verifies user login. I want that form to show first then, if the user login is successful, the main form should show.
this is what I have tried(in the second form):
...
2
votes
1
answer
63
views
Why it ignores my while condition when I input an void string ('nothing here')?
I have this code:
sex = str(input('type sex:')).upper()
while sex not in 'MF':
sex = str(input('try again: ')).upper()
print('Done!!!')
It works fine as a validation thing when I try to input ...
0
votes
1
answer
166
views
How to restore InputVerifier mechanism while using cancel button?
I have an InputVerifier on a JFormattedTextField. It is called when field looses focus perfectly. I added a cancel button (JButton), but do not want to call then InputVerifier when this button is ...
0
votes
1
answer
870
views
Should user input verification be done at class level or UI level?
Say you have a console application with:
Main.java and ClassA.java
Your main class contains the public static void main(String[] args) method where you run your program, and it uses user input as ...
0
votes
0
answers
61
views
Passing class instance in the void method
I'm trying to control button from Add Employee class so I can disable or enable it if the user input is accepted or not using InputVerifier. What I did I made a getter and setter for my ...
0
votes
2
answers
203
views
getName method cannot verify JTextField from other class
I wanted to verify my other JTextField using InputVerifier method. What I did I set a named for a different JTextField using setName.
private void validateJTextField()
{
tfAddress.setName("...
1
vote
1
answer
1k
views
JButton does not gain focus immediately after setEnabled(true)
I am trying to make an intuitive user interface where the user would enter the numeric values into the JTextFields, advance with the TAB key and finally activate the button to start processing the ...
3
votes
1
answer
991
views
VerifyInputWhenFocusTarget property has no effect
I am attempting to validate the text field user inputs using javax.swing.InputVerifier and the input validation works as expected but I have a problem regarding VerifyInputWhenFocusTarget property.
I'...
1
vote
1
answer
109
views
use abstract class inputverifier java in another class
I have two classes
public class Finestra extends javax.swing.JFrame{
........
jtextField.setinputVerifier(.....):
}
public abstract class Verifica extends InputVerifier{
String message;
...
0
votes
1
answer
87
views
java extends javax.swing.jframe and inputverifier
I have need
to extends javax.swing.jframe and inputverifier. Can i resilienza this problema? ?? I try to use more classes But this doesn't work. Can I use a inner class?
Public class framePrincial ...
0
votes
1
answer
87
views
Java Interface in InputVerifier
I have this code:
public class Anagrafica implments ClientiInterface{
InputVerifier verifierAliquotaIva = new InputVerifier() {
public boolean verify(JComponent input) {
boolean ...
0
votes
1
answer
65
views
How I can make the input control verify an email address is of valid form?
I have a form and among the fields to fill is the mail I want to make a control so that the input address is consistent with the standard mails
responsableTechnique.setMail(mailResponsable.getText());...