The MovieBooking tutorial shows you how to create a MIDlet UI with the eSWT API and how to use common eSWT features. You can also download the MIDlet project files and run the built MIDlet immediately on your device or in your SDK emulator.
Note: This tutorial only covers code that shows you how to use the eSWT API. Code related to the application logic of the example MIDlet is not documented in detail.
This tutorial shows you how to:
Create a top-level eSWT hierarchy
Create an eSWT event loop
Create Shells
, Displays
, and Dialogs
Handle multithreading in eSWT
Handle events
Use some of the widgets contained in the eSWT Core and eSWT Mobile Extensions packages
Organize widgets using layout
Add commands
Use low-level graphics
The example MIDlet, MovieBooking
, serves as
the front-end of a movie theatre ticket booking system. Since the
MIDlet is only intended to serve as an example, some of the code has
been implemented to mimic real deployment environments. For example,
while the back-end would typically be located on a remote server and
connections would be formed using Web Services, here the example uses
a simulated local database.
The example MIDlet allows you to:
Contact the database and retrieve a list of available movies
Follow the progress of the connection through a splash screen displayed at start-up
See the list of movies displayed on screen
Retrieve a short description of each movie
Request to book seats for a movie
Use a form to enter required information and select a seat
Receive a confirmation of the booking
Book multiple movies
Close the MIDlet at any time