MIDlets « J2ME Wireless « Java Articles

Java Articles
1. Build Deploy
2. Class
3. Core Library
4. Data Types
5. Database JDBC
6. Design
7. Development
8. File Input Output
9. Graphics Desktop
10. J2EE Enterprise
11. J2ME Wireless
12. JVM
13. Language
14. Library Product
15. Network
16. Security
17. SOA Web Services
18. Test
19. Web Development
20. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Products
Java by API
Photoshop Tutorial
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Articles » J2ME Wireless » MIDlets 
1. Low-Level Display Access in MIDlets
"javax.microedition.lcdui.Display is the only means for MIDlets to gain access to the screen. Therefore, as far as a MIDlet is concerned, the Display is the screen. There is exactly one instance of this class for each MIDlet. It can be obtained by calling Display.getDisplay(this). As we will see soon, Display provides important information concerning device capabilities, so it is good practice to save it as a member variable of your MIDlet base class. The setCurrent(...) method is used to display new content, which has to be encapsulated in classes extending Displayable. This is true for children of Screen such as Alert, List, or TextBox, which are high-level user interface components, and Canvas."

2. Internationalize your MIDlets
"Have you ever tried to internationalize your MIDlets only to feel overwhelmed by your efforts? While localizing them using MIDP/CLDC does require a certain amount of work, Java Platform, Standard Edition (Java SE) features a mature API aimed at simplifying internationalization performance. The CDC Foundation provides most of the APIs to achieve internationalization and localization. However, if you want to achieve those things with MIDP/CLDC, it can be a miserable experience; there isn't even a ResourceBundle class available. There is an alternative -- JSR-238 provides classes that you can use directly for localized resources and data formatting."

3. MIDlet development with the Wireless Toolkit
"When it comes to developing wireless applications, being set up with all the right tools is an obvious place to start. Regular contributor John Muchow guides you through the basic steps for MIDlet or J2ME compliation, preverification, and packaging."

4. Better MIDlets by design
"In this article I've focused on design solutions to help you overcome the limitations of MIDP and produce robust, easy-to-use MIDlets. Admittedly, some of the development challenges discussed in this article are quite daunting, but they're not impossible to overcome with smart design choices."

5. The MIDlets advantage
"In this free tutorial, John Muchow, author of the bestseller "Core J2ME Technology and MIDP," teaches you how to create and work with MIDlets, the applications designed to run on wireless Java-enabled devices. After Nokia's announcement, estimating that in 2002 it will sell over 50 million J2ME-enabled mobile phones, there has been a flood of interest in software development revolving around J2ME (Java 2 Micro Edition). This tutorial provides a step-by-step introduction to downloading, installing, and configuring your computer to begin development of applications for this runtime environment."

6. Handling Life-Cycle Issues with the MIDlet User Interface
"This is one in a series of tutorial lessons designed to teach you how to write programs using the Sun Java Wireless Toolkit for CLDC. The first lesson was titled Getting Started with MIDlets and the Sun Java Wireless Toolkit for CLDC. This is the second part of a lesson titled Introduction to the MIDlet User Interface (see Resources)."

7. Using Lists in MIDlets
"This is one in a series of tutorial lessons designed to teach you how to write programs using the Sun Java Wireless Toolkit for CLDC. The first lesson was titled Getting Started with MIDlets and the Sun Java Wireless Toolkit for CLDC. The previous lesson was titled Using Alerts, Images, Timers, and Gauges in MIDlets (see Resources)."

8. Programming MIDlets for Interactive Behavior
"That wraps up the discussion on how to program MIDlets for interactive behavior. We've covered a lot of material in this lesson, so you may want to go back and review it one more time to make certain that you understand it completely."

9. Introduction to the MIDlet User Interface, A First Look
"In this lesson, I will use an object of the TextBox class to teach you the fundamentals of user interfaces for MIDlets. I will show you how to instantiate user interface components and how to cause them to become visible on the cell phone screen. I will explain the difference between a Screen and a Display. I will explain how to use restrictive constraints and modifier flags to control the manner in which text can be edited. I will discuss the class hierarchy for that portion of the hierarchy that deals with user interface components. I will briefly explain the methods of the various classes that can be used to manipulate user input and output."

10. Using Alerts, Images, Timers, and Gauges in MIDlets
"This is one in a series of tutorial lessons designed to teach you how to write programs using the Sun Java Wireless Toolkit for CLDC. The first lesson was titled Getting Started with MIDlets and the Sun Java Wireless Toolkit for CLDC. The previous lesson was titled Introduction to the MIDlet User Interface, Part 2 (see Resources)."

11. Using Forms and Items in MIDlets
"Forms grow vertically and scroll vertically as necessary. For example, with the Sun cell phone emulator, a Form that is taller than the screen can be scrolled vertically using the up and down arrow keys on the cell phone keypad (see Figure 3). The height of a Form varies depending upon the number of rows and the height of each row. The height of each row is determined by the items that are positioned on that row. Rows need not all have the same height."

12. Images, Drawn Graphics, and Event Handling in a MIDlet
"In this lesson, you will learn how to mix image file data and drawn graphics on a cell phone screen. You will learn how to draw various shapes such as rectangles, circles, arcs, filled triangles, and rounded rectangles. You will learn how to use an off-screen image, and how to use the event handling capability of the Canvas class for simple animation. You will also learn how to make your MIDlet animations efficient by minimizing the screen area that must be repainted."

13. Programming MIDlet Graphics using the Canvas Class
"The purpose of this MIDlet named Canvas03 is to illustrate the following major programming concepts involving the use of the Canvas class and the Graphics class:"

14. Beginning J2ME: Building MIDlets
"The actual development process, however, is a little more complicated for MIDlets than it is for J2SE applications. Beyond a basic compile-and-run cycle, MIDlets require some additional tweaking and packaging. The complete build cycle goes like this: edit, source code, compile, preverify, package, test or deploy."

15. The Mobile Information Device Profile and MIDlets, Part 5
"The Mobile Information Device Profile and MIDlets, Part 3 Part three of a five-part book excerpt from O'Reilly's J2ME in a Nutshell by Kim Topley. This installment focuses on a MIDlet's three states: paused, active, and destroyed."

16. The Mobile Information Device Profile and MIDlets, Part 2
"For the mobile device owner, this means that a MIDlet appears to be more of a potential threat than an applet would to a browser user, because the MIDlet is not constrained by the Java applet "sandbox" that the browser imposes via a SecurityManager. A mobile device owner needs to be careful when installing MIDlets and, preferably, he should accept software only from trusted sources. Unfortunately, at the time of writing, there is no way for the user to be completely sure who is actually providing a MIDlet or that the MIDlet code has not been interfered with en route to the device; the authentication mechanisms that provide this for the J2SE platform (i.e., public key cryptography and certificates) are not a standard part of the MIDP specification. The secure version of the HTTP protocol (HTTPS), which will help to alleviate this problem, is under consideration for inclusion in a future version of MIDP. In the meantime, there is limited security against malicious MIDlets. There are no MIDlet APIs that allow access to information already on the device, such as address and telephone number lists or calendars, and it is not possible for a MIDlet to directly control the device. As you'll see in Chapter 6, a MIDlet can store information on a device, but that storage is private to that MIDlet and its suite, so the MIDlet can harm only its own data."

17. The Mobile Information Device Profile and MIDlets, Part 4
"Since you haven't yet seen how to create user interfaces, this example MIDlet communicates by writing messages to its standard output stream. On a real device, you can't see what is written to standard output or standard error (unless you are using debug facilities provided by the device vendor), but most device emulators provide a way to monitor the content of these streams. There are several products available that allow you to build and test MIDlets either in an emulated environment or on the real device; some of these products are described in Chapter 9. Here, we'll use the Wireless Toolkit, which is available free of charge from Sun."

18. The Mobile Information Device Profile and MIDlets, Part 1
"As you'll see over the next few chapters, MIDP includes quite a lot of software that is not part of the core Java platform and therefore requires more memory than the minimal CLDC environment is obliged to supply. The MIDP specification requires at least 128 KB of RAM be available to store the MIDP implementation itself, over and above whatever is needed by CLDC. In addition to this, there must be at least 32 KB available for the Java heap. In practice, a 32 KB heap is very limiting and demands that the developer exercise great care when allocating objects and take all possible steps to avoid holding references to objects longer than necessary, in order to allow the garbage collector to reclaim heap space as quickly as possible. As well as the RAM requirement, MIDP devices must also supply at least 8 KB of nonvolatile memory to be used as persistent storage so that MIDlets can save information in such a way that it is not lost when the device is switched off. The content of this storage is not guaranteed to be preserved over battery changes, however, and there is a general expectation that the device also provides some way (such as the PDA "hot sync" mechanism) to back up its content to a more permanent location."

19. MIDlet Packaging with J2ME
"In last months article, J2ME and MIDP Development, we covered the basics of Java 2 Micro Edition (J2ME) and the Mobile Information Device Profile (MIDP). We touched upon installation, configuring the environment, writing a simple MIDlet, as well as compiling, pre-verifying class files, and running a MIDlet on a mobile device emulator."

20. The Mobile Information Device Profile and MIDlets, Part 3
"At any given time, a MIDlet is in one of three states: Paused, Active, or Destroyed. A state diagram that shows how these states are related and the legal state transitions is shown in Figure 3-4."

21. java.net: J2ME Tutorial, Part 1: Creating MIDlets
"Java 2 Micro Edition (J2ME) combines a resource-constrained JVM and a set of Java APIs for developing applications for mobile devices. This article is the first in a series. This time, after a quick introduction to J2ME, I will provide a step-by-step guide to creating J2ME applications, also known as MIDlets, using a simple example. This will cover how to test and deploy these MIDlets as well. Finally, I will round out this installment with a look at the lifecycle of a MIDlet."

w_w_w__.ja___va_2___s__.__com_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.