java 错误 104 未捕获:illegalArgumentException
我正在尝试在我的主页上设置背景。为此,我在构造函数中编写了以下内容
public MyScreen()
{
setTitle("Hello AADi WELCOME TO AYANSYS ");
background = Bitmap.getBitmapResource("CVMS.jpg");
VerticalFieldManager vfm = new VerticalFieldManager(USE_ALL_HEIGHT | USE_ALL_WIDTH | VerticalFieldManager.NO_VERTICAL_SCROLL);
vfm.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("CVMS.jpg"),Background.POSITION_X_LEFT,Background.POSITION_Y_TOP,Background.REPEAT_SCALE_TO_FIT);
add(vfm);
}
然后得到
java 错误 104 未捕获:IllegalArgumentException
任何人都可以帮我解决这个问题吗
I am trying to set a background on my home page. For that, I have written the following in the constructor
public MyScreen()
{
setTitle("Hello AADi WELCOME TO AYANSYS ");
background = Bitmap.getBitmapResource("CVMS.jpg");
VerticalFieldManager vfm = new VerticalFieldManager(USE_ALL_HEIGHT | USE_ALL_WIDTH | VerticalFieldManager.NO_VERTICAL_SCROLL);
vfm.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("CVMS.jpg"),Background.POSITION_X_LEFT,Background.POSITION_Y_TOP,Background.REPEAT_SCALE_TO_FIT);
add(vfm);
}
Then am getting
java error 104 Uncaught:IllegalArgumentException
Can any one please help me to solve this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您调用带有错误参数的方法时,会发生此异常,此错误可能是参数类型。
IllegalArgumentException java doc 说:
这个教程可能会帮助您:http://www.javapractices。 com/topic/TopicAction.do?Id=5
此类是未经检查的异常,因为它扩展了 RuntimeException。
注意:为了更好的帮助,您必须发送更多描述,请解释完整您的程序。
this exception occured when you call a method with wrong arguments, this error may type of argument.
IllegalArgumentException java doc says:
This toturial may help you: http://www.javapractices.com/topic/TopicAction.do?Id=5
This class is unchecked exception beacuse it extend RuntimeException.
Note: for better help, you have to send more description, please explain complete your program.