I have the button event saved, when I click to save, the following appears: Java.lang.String cannot be cast to org.nomedopacote.modelo.Funcionario
-
cbNomeUsuario - This is the name of Jcomobox that is getting a List Officer.
usuario.setFuncionario((Funcionario) cbNomeUsuario.getSelectedItem());
A cast error, can anyone help me?
I want to get the return or the employee ID to save to the bank.
Save to normal bank: object.getFunction (). getId ();