JButton jButton1 = new JButton();
这里你重新定义了一个jButton1 ,覆盖了全局变量jButton1 ,所以把JButton 去掉就可以了。

解决方案 »

  1.   

    NullPointerException你看看哪里是不是有组件没有 new 就加载显示了
      

  2.   

    同理,好象你还有很多这样的情况
    JRadioButton jRadioButton1 = new JRadioButton();
          JRadioButton jRadioButton2 = new JRadioButton();
          JRadioButton jRadioButton3 = new JRadioButton();
          JRadioButton jRadioButton4 = new JRadioButton();
          JRadioButton jRadioButton5 = new JRadioButton();
          JRadioButton jRadioButton6 = new JRadioButton();
          JRadioButton jRadioButton7 = new JRadioButton();
          JRadioButton jRadioButton8 = new JRadioButton();
          JRadioButton jRadioButton9 = new JRadioButton();
          JRadioButton jRadioButton10 = new JRadioButton();
          JRadioButton jRadioButton11 = new JRadioButton();
          JRadioButton jRadioButton12 = new JRadioButton();都是重新定义了局部变量从而隐藏了全局变量。把JRadioButton 都去掉。