public static void main(String[] args)
{
new myMenuDemo();
}
}
Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1041)
at java.awt.Container.add(Container.java:365)
at myMenuDemo.init(myMenuDemo.java:47)
at myMenuDemo.<init>(myMenuDemo.java:19)
at myMenuDemo.main(myMenuDemo.java:115)作者: 冉世友 时间: 2012-12-29 10:00
哥们,你忘创建这个对象了 ta = new TextArea();作者: yuchen208 时间: 2012-12-29 10:25
/**
* 添加TextArea
*/
ta = new TextArea();
f.add(ta);
需要实例化