容器问题container c=getContentPane(); c.setlayout(new FlowLayout()); 第一句对不,什么意思呀[解决办法]一般直接用 this.getContentPahe().setLayout(new FlowLayout()); 而且在5.0以后可以直接调用 JFrame.setLayout(...) 至于什么意思, 你可以看下Swing窗口的设计, 分好几个层次的面板...