i am a newbie to LWUIT so probably thats why i am having this problem.This is my code
import com.sun.lwuit.Button;
import com.sun.lwuit.Display;
import com.sun.lwuit.Form;
import com.sun.lwuit.Label;
import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.events.ActionListener;
import com.sun.lwuit.layouts.BorderLayout;
import com.sun.lwuit.plaf.UIManager;
import com.sun.lwuit.util.Resources;
import java.io.IOException;
public class Ruwwa extends javax.microedition.midlet.MIDlet implements ActionListener{
Form f;
Button mybutton;
public void startApp() {
f = new Form("Mairuwa Portal");
mybutton=new Button("Exit");
f.setLayout(new BorderLayout());
f.addComponent(BorderLayout.CENTER, new Label("Welcome to the Mairuwa Portal"));
mybutton.addActionListener(this);
f.addComponent(BorderLayout.SOUTH,mybutton);
Display.init(this);
try {
Resources r = Resources.open("/working.res");
UIManager.getInstance().setThemeProps(r.getTheme("Mairuwa Theme"));
} catch (IOException ioe) {
ioe.printStackTrace();
}
f.show();
}
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
public void actionPerformed(ActionEvent ae) {
notifyDestroyed();
}
}
I compiled this using the NOKIA SDK 1.0 emulator and added the NOKIA_IO.JAR, LWUIT_MIDP.JAR and the MIDP_IO.JAR to the resources folder.I also added my theme "working.res" to the src folder of the package.
In my application descriptor, i have "Ruwwa" as Midlet name and "Ruwwa" as my class name
I got the following error when did the build:
Created dir: C:\Users\HAFIZ\Documents\NetBeansProjects\Mairuwa\build\preverifysrc
Copying 268 files to C:\Users\HAFIZ\Documents\NetBeansProjects\Mairuwa\build\preverifysrc
Created dir: C:\Users\HAFIZ\Documents\NetBeansProjects\Mairuwa\build\preverified
Preverifying 268 file(s) into C:\Users\HAFIZ\Documents\NetBeansProjects\Mairuwa\build\preverified directory.
C:\Users\HAFIZ\Documents\NetBeansProjects\Mairuwa\nbproject\build-impl.xml:483: Preverification failed with error code 1.
BUILD FAILED (total time: 9 seconds)
i got the following error when i did the clean and build:
Error preverifying class com.sun.lwuit.impl.midp.CanvasImplementation
VERIFIER ERROR com/sun/lwuit/impl/midp/GameCanvasImplementation.paintVideo(Lcom/sun/lwuit/Component;ZLjava/lang/Object;Ljava/lang/Object;Ljava/lang/ObjectV:
Cannot find class javax/microedition/media/control/VideoControl
C:\Users\HAFIZ\Documents\NetBeansProjects\Mairuwa\nbproject\build-impl.xml:483: Preverification failed with error code 1.
BUILD FAILED (total time: 9 seconds)
I also got the following error in the emulator when i ran it:
class Not Found java/lang/classNotFoundException Ruwwa

V:
Reply With Quote

