无法通过com.sun.lwuit.image.createimage从矢量对象创建图像

时间:2013-08-20 08:32:21

标签: java java-me

这是我的代码。我无法从这个矢量对象创建图像。

Hashtable metaData = new Hashtable();

Vector Ad = IADView.getBannerAdData(LwuitAd.this, "MyCompany_MyApp", metaData);
Object retImg = null;

if (null != Ad) {
    retImg = Ad.elementAt(0);
}

if (retImg != null) {
    com.sun.lwuit.Image img = com.sun.lwuit.Image.createImage(Ad.elementAt(0));// it shows error in this line
    Button buttonAd = new Button();
    buttonAd.setIcon(img);
    f.addComponent(BorderLayout.NORTH, buttonAd);
    f.show();
} else {
    System.out.println("retImg is null");
}

1 个答案:

答案 0 :(得分:2)

使用这些类从Inneractive的IADView中提取图像

https://projects.developer.nokia.com/JMEWeatherApp/browser/jmeweatherapp/src/com/nokia/example/weatherapp/ads?rev=b5af8939ab6a9bb084c56ff898989534a06afc38&order=name

您还可以查看其在诺基亚天气项目中的实施情况

干杯