你试试是不是因为没有加  setVisible(true); 的原因

解决方案 »

  1.   

    frame.getContentPane().add(cp);
    后面加上
    frame.show()就可以了
      

  2.   

    you should move this statement  frame.setVisible(true);
    to end of your T422(). By the way, you are not in the correct way of using inheritance. You should not create another frame within T422 as T422 actually is a frame itself.
      

  3.   

    谢谢大家了,我刚开学习java 关于界面这方面知识!还很迷茫,不知道该怎么去学,希望大家给我一些指导!