0
I would like to know how to trigger different events using the same button. What I wanted is that, with the next click, he gave a jButton1.setText("Créditos");
and return to the btnGerar.setVisible(true);
The idea is that when I click on "Credits", everything would disappear and only my name would appear, and after clicking back(which would be the same button), it would appear the other menus back.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
pnBusca.setVisible(false);
pnOpcao.setVisible(false);
btnGerar.setVisible(false);
jButton1.setText(" Voltar ");
}