Skip to Main Content
Wireless Java
book

Wireless Java

by Qusay H. Mahmoud
January 2002
Intermediate to advanced content levelIntermediate to advanced
264 pages
8h 3m
English
O'Reilly Media, Inc.
Content preview from Wireless Java

Developing New Applications

You can easily develop new Java applications for the Palm if you are familiar with the MIDlet programming model. If you have run the MIDlets in earlier chapters, or have developed new ones, you can easily turn them into Palm applications by using a converter tool, which we will describe later in this chapter. The development life cycle of a Palm application can be summarized in the following three steps:

  1. Develop a MIDlet or a MIDlet suite.

  2. Convert the JAR/JAD file pair into a PRC file (executable Palm application).

  3. Install the PRC file on the Palm and test the application.

Develop a MIDlet

As always, you can use either the Sun Microsystems Wireless Toolkit or your favorite development environment to develop a MIDlet. Example 9-1 lists the MIDlet that was developed in Chapter 6, which shows how to create various GUI components. The MIDlet for this example allows you to test lists, forms, choices, gauges, text fields, and text boxes.

Example 9-1. GuiTests.java

import javax.microedition.lcdui.*; import javax.microedition.midlet.*; public class GuiTests extends MIDlet implements CommandListener { // display manager Display display = null; // a menu with items List menu = null; // main menu // list of choices List choose = null; // textbox TextBox input = null; // ticker Ticker ticker = new Ticker("Test GUI Components"); // alerts final Alert soundAlert = new Alert("sound Alert"); // date DateField date = new DateField("Today's date: ", DateField.DATE); // form ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Wireless J2ME™ Platform Programming

Wireless J2ME™ Platform Programming

Vartan Piroumian
Java Power Tools

Java Power Tools

John Ferguson Smart

Publisher Resources

ISBN: 0596002432Supplemental ContentCatalog PageErrata