• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Splashscreen code in j2me

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Once you dismiss the canvas in keypress or timertask, display the login screen.
 
Priyanka Gawada
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is not working.
If you have any code, kindly share.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you're gonna buy things, buy this thing and I get a fat kickback:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic