【发布时间】:2013-05-16 06:44:35
【问题描述】:
我运行LWUITDemo,有些UI无法显示成功。它们都是Form包含的TextArea。如果我将TextArea更改为Label,它可以正常工作。
抱歉,我在诺基亚 s40 sdk 2.0 中运行它。当我运行大多数包含 TextArea 的代码时,出现异常;
这样的代码(来自 LWUITDemo):
Form aboutForm = new Form("About");
aboutForm.setScrollable(true);
aboutForm.setLayout(new BorderLayout());
TextArea aboutText = new TextArea(getAboutText(), 5, 10);
aboutText.setEditable(false);
aboutForm.addComponent(BorderLayout.CENTER, aboutText);
aboutForm.show();
当我运行它时,它失败了:
Form: showModal
java.lang.NullPointerException
at com.sun.lwuit.TextArea.shouldShowHint(+21)
at com.sun.lwuit.TextArea.calcPreferredSize(+4)
at com.sun.lwuit.Component.preferredSize(+63)
...
【问题讨论】: