aspose file tools*
The moose likes Java Micro Edition and the fly likes Midlet to call a j2me java class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Midlet to call a j2me java class" Watch "Midlet to call a j2me java class" New topic
Author

Midlet to call a j2me java class

Mutua Kakinyi
Greenhorn

Joined: Apr 21, 2011
Posts: 7
Am trying to develop an application to dispaly a form containing textfields. Lets call this java class A. First, I have a welcome midlet (call it midlet B) that I will call java class A and the textfields appear on the emulator screen. How is this possible? If midlets can call one another, then will be easy. I would just make A a midlet then I call its startup method in B.

I have tried push registry after some blog but I have no idea of its working and given-up.

I welcome anyone with suggestions or a sample code.

Mutua
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10266
    
    8

You are doing it wrong. You don't need multiple midlets. All you need to do is set the current displayable to your a form instance

1) In your A which extends Form, you will need to append your TextFields to the form
2) In B#startApp you will need something like Display.getDisplay(this).setCurrent(aFormInstance);


http://developers.sun.com/mobility/learn/midp/getstart/


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
 
subject: Midlet to call a j2me java class