创建了一个con 类做了A面板jPanel1
创建了一个uppc类做了B面板
窗口类NetFrame都是public 的类,且都在同一个包中
下面是B面板里面的一个'确定'按钮的事件:
   public void jButton1_actionPerformed(ActionEvent e) {        NetFrame test3 = new NetFrame(); //创建一个窗口类的对象
        contentPane test4 = new contentPane();//创建一个con类的对象
        test3.contentPane.removeAll();//窗口对象调用中间面板的removeAll方法,先将面板清空
        test3.contentPane.add(test4.jPanel1);//在窗口对象调用中间面板加载con类的面板
        test3.contentPane.updateUI();//执行更新UI
    }问题是点了确定按钮后,没办法替换面板???