J2ME will not show me MIDlet

So here is what I do...

File->new project
create project from scratch Click next
Select J2ME and title it testApp Click next
Click next
select my Wireless Toolkit Click next
Title my project Click next
The project shows up then I select
new->Midlet and set up the name and everything
then I edit the midlet as follows
package test;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class testScreen extends javax.microedition.midlet.MIDlet
{
private TextBox tbox;
public testScreen()
{
tbox = new TextBox("Hello world MIDlet", "Hello World!", 25, 0);
}
public void startApp()
{
Display.getDisplay(this).setCurrent(tbox);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}
}

Then I create a run configuration and run it but nothing shows up in the emulator screen except "select one of the following" does Itellij even work with the emulator? Is there a tutorial for this sort of thing?

2 comments
Comment actions Permalink

Hello Jackie,

How did you create a run configuration? Right click?

What ME plugins do you use?

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

So here is what I do...

File->new project
create project from scratch Click next
Select J2ME and title it testApp Click next
Click next
select my Wireless Toolkit Click next
Title my project Click next
The project shows up then I select
new->Midlet and set up the name and everything
then I edit the midlet as follows
package test;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class testScreen extends javax.microedition.midlet.MIDlet
{
private TextBox tbox;
public testScreen()
{
tbox = new TextBox("Hello world MIDlet", "Hello World!", 25,
0);
}
public void startApp()
{
Display.getDisplay(this).setCurrent(tbox);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
Then I create a run configuration and run it but nothing shows up in
the emulator screen except "select one of the following" does Itellij
even work with the emulator? Is there a tutorial for this sort of
thing?



0
Comment actions Permalink

Jackie Gleason wrote:

Then I create a run configuration and run it but nothing shows up in
the emulator screen except "select one of the following" does Itellij
even work with the emulator? Is there a tutorial for this sort of
thing?


Check your "mobile module settings": project settings -> modules ->
"testApp". Now select the "Mobile Module Settings".
The first four input-boxes ("MIDlet-Name", "MIDlet-Jar-URL" and so on)
probably are filled-in, but I suspect the bigger box underneath (labeled
"Defined MIDlets"), is empty.
Define your MIDlet there (Add.. etc.), and you should be able to run
your midlet.

Alternatively, in the source move the cursor to the midlet class name,
and a quickfix should pop up: "Append testScreen to 'testApp' suite".
Accomplishes the same thing.

The first four boxed in the "Mobile Module Settings" actually define the
MIDlet Suite - not the individual MIDlets themselves. Confusing, but not
JetBrains' fault - the labels used are the actual entries in the
JAD/Manifest files, and were specified by Sun. Still, JetBrains could
relabel them to make it more obvious these settings refer to the MIDlet
suite...

--

Groeten,
Edwin

0

Please sign in to leave a comment.