So I have a custom button that once you select it you can't un-select it. I want to check if 6 buttons on my program are selected and do something after that. Looks messy but I thought that would have worked for me. Suggestions please?
if(bomb28.getModel().isPressed()){
if(bomb37.getModel().isPressed()){
if(bomb16.getModel().isPressed()){
if(bomb17.getModel().isPressed()){
if(bomb1.getModel().isPressed()){
if(bomb3.getModel().isPressed()){
jLabel3.setEnabled(true);
jLabel3.setVisible(true);
jLabel3.setText("YOU HAVE WON");
}
}
}
}
}
}