• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Splashscreen code in j2me

 
Priyanka Gawada
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
Priyanka Gawada
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you dismiss the canvas in keypress or timertask, display the login screen.
 
Priyanka Gawada
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not working.
If you have any code, kindly share.
 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic