I have a problem making a panel visible after rendering another panel invisible.
This is my JFrame, which contains a JPanel
which in turn contains these 3 JButton
as you can see:
So that you have a clearer idea of what I do:
This is the method I use in any of the 3 buttons to make the start disappear and make any other appear.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
panelInicio.setVisible(false);
panelPrimalidad.setVisible(true);
panelSubconjuntos.setVisible(false);
panelKColoreable.setVisible(false);
}
The running result is the following after pressing any of the buttons:
And the structure of all my JPanel
(different from the Start) is this: