I have two classes
public class Finestra extends javax.swing.JFrame{
........
jtextField.setinputVerifier(.....):
}
public abstract class Verifica extends InputVerifier{
String message;
public Verifica(String message){
}
public abstract boolean verifica(JtextField c);
public boolean verify(Jcomponent c){
JTextField c = (JTextField) jc;
if (esito(c) == false){
return false;
}else{
return true;
}
}
}
}
I want to use Verifca class in finestra. I don't extends it because there is javax.swing.JFrame. Can i do to use Verifica? and is it a problem the only abstract method verifica.
I try this, but doesn' work
testo.setInputVerifier(new Verifica("error") {
public boolean verifica(testo){
if (testo.getText == null){
return true;
}else{
return false;
}
}
});