这是我的代码。我无法从此矢量对象创建图像。
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");
}