本篇博文最后修改时间:2020年07月13日 14:13。
一、简介
本文以java JTextArea控件编程为例,介绍jJTextArea控件。
二、实验平台
电脑平台:Windows10 64位旗舰
编译软件:eclipse
硬件平台:无
三、版权声明
博主:_懵懂
声明:此博客仅供参考不做任何商业用途,最终解释权归原博主所有。
原文地址:http://blog.csdn.NET/qq_18842031
懵懂之MCU交流群:136384801
四、实验前提
1、在进行本文步骤前,请先安装ellipse;准备好相应的平台。
五、基础知识
暂无
六、源码地址
暂无
七、关联文章
暂无
八、实验内容
1.方法一 使用append方法追加数据
//-----初始化
final JTextArea textField1 = new JTextArea("");
this.add(textField1);
textField1.setLineWrap(true);
textField1.setWrapStyleWord(true);
textField1.setBounds(420,270,40,20);
TextBorderUtlis Border1 = new TextBorderUtlis(new Color(192,192,192),1,true);
textField1.setBorder(Border1);
//-----追加的数据
textField1.append(“写入需要追加的数据!!!”);
textField1.append("\r\n");