File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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

Midlet to call a j2me java class

Mutua Kakinyi

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.

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10768

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);

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Midlet to call a j2me java class
It's not a secret anymore!