您的位置:首页 > 其它

JTextArea 加入滚动条

2015-11-08 12:17 176 查看
JTextArea texA;
JScrollPane scroll;

TextEdit(String name){
super(name);
init();
}

void init(){
this.setBounds(100,100,600,400);
JPanel pan = new JPanel();
pan.setLayout(new FlowLayout(FlowLayout.CENTER));
pan.setBackground(Color.YELLOW);

texA = new JTextArea("34reterte35",20,30);
scroll = new JScrollPane(texA);
pan.add(scroll);
this.add(pan);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: