//滾動條
scrollPane = new
//再把文本域textArea添加到滾動條上
scrollPane.add(textArea);
//最後把滾動條添加到frame上
frame.add(scrollPane);
//滾動條
scrollPane = new
//再把文本域textArea添加到滾動條上
scrollPane.add(textArea);
//最後把滾動條添加到frame上
frame.add(scrollPane);