标题:JAVA 帮我找一下错误
取消只看楼主
1999
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2005-10-16
 问题点数:0 回复次数:0 
JAVA 帮我找一下错误
1 (Example8_7)

我定义了一个十行十列的文本区,但发现它可以随便的输入字符而不受行和数量的限制。请指教。

2(Example8_7)

如下程序:
TextArea text1,text2;
  Button button;
  { button=new Button("确定");
    text1=new TextArea(10,10);
    text2=new TextArea(10,10);
    text2.setEditable(false);
     add(text1); add(text2); add(button);
    button.addActionListener(this);
  }
  
  public void actionPerformed(ActionEvent e)
  { /*if(e.getSourec()==button)*/
      { text2.append("\n"+text1.getSelectedText());}
  }
  为何当注释段加上时,编译不下去呢
搜索更多相关主题的帖子: JAVA 
2005-10-16 16:19



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-30342-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.542369 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved