JCheckBox a = new JCheckBox("a");
JCheckBox b = new JCheckBox("b");
JCheckBox c = new JCheckBox("c");
a.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
           b.setEnabled(!b.isEnabled());
           c.setEnabled(!c.isEnabled());
        }
      });

解决方案 »

  1.   

    JCheckBox a = new JCheckBox("a");
    JCheckBox b = new JCheckBox("b");
    JCheckBox c = new JCheckBox("c");
    a.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               b.setEnabled(!b.isEnabled());
               c.setEnabled(!c.isEnabled());
            }
          });============= 支持顶顶呵呵应该可以结帖喽
      

  2.   

    JCheckBox a = new JCheckBox("a");
    JCheckBox b = new JCheckBox("b");
    JCheckBox c = new JCheckBox("c");
    a.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               b.setEnabled(!b.isEnabled());
               c.setEnabled(!c.isEnabled());
            }
          });