I have tried to setVisible(null); but it produces an java.lang.NullPointerException. the JPanel setLayout(null); which I think is the issue, I don't know how to resolve it. I,m using a card layout to reduce windows in the application. Any help would be appreciated.
final JPanel Signin = new JPanel();
contentPane.add(Signin, "name_12988058891368");
Signin.setLayout(null);
JButton btnNewButton = new JButton("New button");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Signin.setVisible(false);
Home.setVisible(true);
}
}