怎么在jtextarea加入滚动条
1个回答
展开全部
private JTextArea area = new JTextArea();
private Test(){
this.setLayout(null);
area.setSize(420,170);
area.setLocation(10,80);
area.setMargin(new Insets(10,10,10,10));
Font font = new Font("宋体",0,15);
area.setFont(font);
this.add(area);
this.setSize(465,300);
this.setLocation(650,100);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
private Test(){
this.setLayout(null);
area.setSize(420,170);
area.setLocation(10,80);
area.setMargin(new Insets(10,10,10,10));
Font font = new Font("宋体",0,15);
area.setFont(font);
this.add(area);
this.setSize(465,300);
this.setLocation(650,100);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询