GUI组件——TextArea
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package x_09;
import java.awt.*;
import javax.swing.*;
/**
*
* @author Administrator
*/
public class TextArea extends JFrame {
public TextArea(){
super("文本区域—TextArea");
setSize(500,350);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
FlowLayout flo=new FlowLayout();
setLayout(flo);
JTextArea comments=new JTextArea();
add(comments);
JTextArea desire=new JTextArea("I
should have been love in you so much!n",10,25);
add(desire);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
TextArea sal=new TextArea();
}
}
运行截图:
最后
以上就是敏感咖啡最近收集整理的关于【GUI组件】TextArea的全部内容,更多相关【GUI组件】TextArea内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复