JCheckBox 已经检查但它说 else 语句

JCheckBox already checked but it says else statement

我为学校项目创建了医院管理系统,我认为我占了系统的 35%,而在患者登记处,我在这里遇到了很多困难,这里是我在第一页的“JFrame1”

First Page

第一页我有这个过去的病史和复查症状以及其他选项,所以如果我不选中任何 JCheckBox 控件,包括 None 复选框,但我单击下一步如果您没有任何既往病史,按钮将弹出选项,代码如下

if(!jCheckBox1.isSelected() || !jCheckBox2.isSelected() || !jCheckBox3.isSelected() || !jCheckBox4.isSelected() || !jCheckBox5.isSelected() || !jCheckBox6.isSelected() || !jCheckBox7.isSelected() || !jCheckBox8.isSelected() || !jCheckBox9.isSelected() || !jCheckBox10.isSelected() || !jCheckBox11.isSelected() || !jCheckBox12.isSelected()|| !jCheckBox13.isSelected() || !jCheckBox14.isSelected() || !jCheckBox15.isSelected() || !jCheckBox16.isSelected() || !jCheckBox17.isSelected() || 
        !jCheckBox18.isSelected() || !jCheckBox19.isSelected() || !jCheckBox20.isSelected() || !jCheckBox21.isSelected() || !jCheckBox104.isSelected() || !jCheckBox102.isSelected() || !jCheckBox100.isSelected() || !jCheckBox98.isSelected() || !jCheckBox111.isSelected() || !jCheckBox94.isSelected() || !jCheckBox95.isSelected() || !jCheckBox99.isSelected() || !jCheckBox109.isSelected() || !jCheckBox112.isSelected() || !jCheckBox110.isSelected() || !jCheckBox97.isSelected() || 
        !jCheckBox107.isSelected() || !jCheckBox101.isSelected() || !jCheckBox106.isSelected() || !jCheckBox96.isSelected() || !jCheckBox105.isSelected() || !jCheckBox92.isSelected() || !jCheckBox103.isSelected()|| !jCheckBox93.isSelected() || !jCheckBox105.isSelected() || !jCheckBox115.isSelected() || !jCheckBox114.isSelected() || !jCheckBox113.isSelected() || !jCheckBox121.isSelected() || !jCheckBox120.isSelected() || !jCheckBox119.isSelected() || !jCheckBox118.isSelected() || 
        !jCheckBox117.isSelected()|| !jCheckBox116.isSelected() || !jCheckBox127.isSelected()){
    //JOptionPane.showMessageDialog(null, "Medical History is empty","Error",JOptionPane.WARNING_MESSAGE);
    int yesOrno = JOptionPane.showConfirmDialog(null, "No medical History?", "Proceed",JOptionPane.YES_NO_OPTION);
    if(yesOrno == 0){
        jCheckBox127.setSelected(true);
        PARENTPANEL.removeAll();
        PARENTPANEL.add(ALLERGIES);
        PARENTPANEL.repaint();
        PARENTPANEL.revalidate();

        jCheckBox1.setEnabled(false);
        jCheckBox1.setSelected(false);

        jCheckBox2.setEnabled(false);
        jCheckBox2.setSelected(false);

        jCheckBox3.setEnabled(false);
        jCheckBox3.setSelected(false);

JOptionPane Popup even when I already select one

我已经勾选了复选框并单击下一步,但弹出窗口总是出现。

if 子句中将 || 更改为 && 可能会拯救您。