0
Good afternoon, Can someone help me with a project?
I’m developing a simple vaccine system,
but I’m having a hard time accessing attributes between a Jframe and another since in each Jframe I have to instantiate an object as new...
for example I have 2 jframes, I register the data of a user in one, and I need to rescue this data both to log in, and to access the user panel...
for example: Jframe1.java:
Cadastro cadastro = new cadastro();
cadastro.CadastrarUsuario(txtNome.getText(), txtSenha.getText());
then the register class will receive the data through the "register" instance, with the data that was passed to the "Register user" method using getNome() and getName in another Jframe, but how will I access this instance in another Jframe to rescue the same data? something like, Jframe2.java:
Cadastro cadastro;
cadastro.Login(getNome(), getSenha());
if I create a new instance for the registration object in Jframe2 I cannot access the data originally entered in Jframe1...
If anyone would be willing to help me, I would appreciate it very much...
NOTE: I cannot use database in this application, so I need the data stored at runtime.