my dog learned polymorphism*
The moose likes Java Micro Edition and the fly likes Splashscreen code in j2me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Splashscreen code in j2me" Watch "Splashscreen code in j2me" New topic
Author

Splashscreen code in j2me

Priyanka Gawada
Greenhorn

Joined: May 08, 2012
Posts: 12
Query: I want to write a code that has a splashscreen (image + timer) then when user presses any key the Login form is displayed.
Kindly help with the code.
Also, how to call a midlet from another midlet class in j2me?
When I tried, it gives me security error.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6

As far as I know Form can't respond to a key press event, so probably you need a Canvas to display your splash screen, and probably MIDP3.0 supports Inter-Midlet communication

http://java.sun.com/developer/technicalArticles/javame/midp3_enhance/


Swastik
Priyanka Gawada
Greenhorn

Joined: May 08, 2012
Posts: 12
Thanks for the response.
I developed the splashscreen using canvas
Here is the code:


I am not getting the solution to call the Login form after any key is pressed on the splashscreen.
Kindly help me how we can integrate canvas and Login Form in a single midlet, this behavior i saw when I used visual midlet in netbeans.
But, I am not able to get the same through code.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6

Once you dismiss the canvas in keypress or timertask, display the login screen.
Priyanka Gawada
Greenhorn

Joined: May 08, 2012
Posts: 12
It is not working.
If you have any code, kindly share.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6

Can we have a look on your code, i.e. how you are displaying the login screen from this class.
Walter Gabrielsen Iii
Ranch Hand

Joined: Apr 09, 2011
Posts: 158
The javax.microedition.lcdui.Display class has a method called setCurrent(Displayable nextDisplayable). Both Form and Canvas are Displayables, so you just need to call this method when you want to switch screens.

See the Display.setCurrent() in the API.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Splashscreen code in j2me