JPanel centerJP=new JPanel();JTexArea msgContentJTA =new JTextArea(5,5);centerJP.add(msgContentJTB);centerJP.add(new JScrollPane(msgContentJTB);我用这两句代码实现了滚动条的功能但是这两句代码可以写成一句吗?可以教我怎么写吗?多谢冰封大哥!你不是要退出论坛吗?难道舍不得我们吗?呵呵