【发布时间】:2011-09-19 04:20:07
【问题描述】:
我想从 textarea 进行标记化,但我无法调用 textarea。输出无法显示。
下面是我的程序:
static JTextArea Report_tf;
public static void main(String[] args) throws IOException
{
new Form1(); //call form
//tokenization
String speech = Report_tf.getText();
Report_tf.setText(speech);
StringTokenizer st = new StringTokenizer(speech);
while (st.hasMoreTokens())
System.out.println(st.nextToken());
}
【问题讨论】:
-
请更详细地描述您的问题/错误。
-
我无法调用 token..tq 的输入
-
我这里有问题:String Speech = Report_tf.getText(); Report_tf.setText(speech);
-
有什么问题?你得到一个编译时异常吗?运行时错误?发布。
-
我的程序没有错误..但输出不显示。因为我不知道调用 textArea 作为输入..