How to Write an or statement with Int : i have tried to run it multiple ways, but the dialog box comes up even if one is selected. How do i get the dialog box to come up if only one of the buttons is not selected? 


        if (!shapesButtons[0].isSelected())
        {
            JOptionPane.showMessageDialog(null,"Please select one of the Buttons ");
        }

        else if (!shapesButtons[1].isSelected())
        {
            JOptionPane.showMessageDialog(null,"Please select one of the Buttons ");
        }
        else
        {
            return;
        }