dimanche 6 novembre 2016

java.lang.reflect.field getText when field is JTextfield

I have this code:

    Field[] fields = getClass().getDeclaredFields();       
    for (Field field : fields) {        
        if (field.getName().contains("_") == true) {
            // .getText();
        }
    }

It returns all vars in the Class.

Now I have to .getText() when the var contains a "_" (Every JTextField var contains a "_" in name) any Ideas??

Thanks for help.





Aucun commentaire:

Enregistrer un commentaire