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);
}
转载于:https://www.cnblogs.com/xiaochi/p/4947118.html
相关资源:数据结构—成绩单生成器