2
I’m trying to make a button to register to the bank but am having difficulties in converting the int to String.
follows my line of code:
private void jBtnCadastroActionPerformed(java.awt.event.ActionEvent evt) {
f = new Funcionario(String.valueOf(jtxtFuncionario.getText()),
jTxtDepartamento.getText());
jtxtFuncionario.setText("");
jTxtDepartamento.setText("");
f.Save();
}
on the line " f = new Funcionario(String.valueOf(jtxtFuncionario.getText())
" appears the following error:
string cannot be converted to string
Forgive my friend first, the message is "string cannot be converted to Integer"
– Edmundo
@Edmundo error does not match the code. Edit the question and provide a [mcve] because by the code presented, the answer solves the problem.
– user28595