码迷,mamicode.com
首页 > 其他好文 > 详细

文本域组件

时间:2019-03-23 16:16:50      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:close   xtend   cto   new   extend   auto   []   visible   tar   

public class JTextAreaTest extends JFrame{
    public JTextAreaTest() {
        // TODO Auto-generated constructor stub
    setSize(200,100);
    setTitle("定义自动换行的文本域");
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    Container c = getContentPane();
    JTextArea jt = new JTextArea("文本域",6,6);
    jt.setLineWrap(true);
    c.add(jt);
    setVisible(true);
    }
    public static void main(String[] args) {
        // TODO Auto-generated method stub
    new JTextAreaTest();
    }
}

 

文本域组件

标签:close   xtend   cto   new   extend   auto   []   visible   tar   

原文地址:https://www.cnblogs.com/dulute/p/10584073.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!