java - Acces to a Text Field from another class -
i'm working on mini project , find difficulties. indeed, have class jframe "interfaceconnexion" enter username , password, after having clicked jbutton enter, reach new jframe "interfaceclient". in latter wish informations related "username" (i connected database). thought using "username" , "password" entered user can not because textfield private default, impossible have username , password entered in textfield class. hope clear enough in setting out problem. thank you
assuming username , password jtextfields contained within "interfaceconnexion" (incorrect spelling way), should create getter methods less restrictive access modifiers (eg. public or protected) both of the text fields.
you may wish consider using jpasswordfield instead, password input.
Comments
Post a Comment