Explore Ebooks
Categories
Explore Audiobooks
Categories
Explore Magazines
Categories
Explore Documents
Categories
February 2015, - Prepared by Eyob Gebretisnae. Center of Information Technology & Scientific Computing
Lab Three
Java ME UI Part Two (Alert and Command)
Objective:
To Practice Ticker
To understand Alert in Java ME and to Practice all possible alerts with commands
Create a Ticker
Ticker ticker = new Ticker("This is the ticker message!");
Add a ticker to the TextBox using setTicker method
d.setTicker(ticker);
Run the application
Exercise:
Create, TwoAlerts, shows both types of alert. It features a main TextBox that is displayed when
the MIDlet begins. Two commands Go and About, provide access to the alerts. The Go
command shows a timed alert that contains a message about a fictitious network error. The
About command displays a modal alert that could contain copyright information. A third
command, Exit, provides a way to exit the MIDlet. Keep in mind that all three commands may
not fit on the screen; some of them may be accessible from a secondary menu.