Archive for the 'midlet' Category
import java.util.*;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;
public class TimerMidlet extends MIDlet implements CommandListener{ private Display display; private Form form; private Command exit; private Command stop; private Timer timer; private RunTimerTask tt; […]
July 4th, 2007 | Posted in j2me source code, midlet, timer | No Comments
// Starts a timer to run a simple taskprivate void startTimer( ) {
// Create a task to be run task = new TimerTask( ) {
private boolean isPaused; private int count;
[…]
July 4th, 2007 | Posted in j2me source code, midlet, timer | No Comments
/* * * Copyright (c) 2000 Sun Microsystems, Inc. All Rights Reserved. * * This software is the confidential and proprietary information of Sun * Microsystems, Inc. (”Confidential Information”). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered […]
July 4th, 2007 | Posted in basic, j2me source code, midlet | 1 Comment
/*J2ME: The Complete Reference
James Keogh
Publisher: McGraw-Hill
ISBN 0072227109
*///jad file (please verify the jar size)/*MIDlet-Name: SortMixedRecordDataTypeExampleMIDlet-Version: 1.0MIDlet-Vendor: MyCompanyMIDlet-Jar-URL: SortMixedRecordDataTypeExample.jarMIDlet-1: SortMixedRecordDataTypeExample, , SortMixedRecordDataTypeExampleMicroEdition-Configuration: CLDC-1.0MicroEdition-Profile: MIDP-1.0MIDlet-JAR-SIZE: 100
*/
import javax.microedition.rms.*;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import java.io.*;
public class SortMixedRecordDataTypeExample extends MIDlet implements CommandListener{ private Display […]
July 4th, 2007 | Posted in j2me source code, midlet, rms | No Comments
/*J2ME: The Complete Reference
James Keogh
Publisher: McGraw-Hill
ISBN 0072227109
*/
// jad file (Please verify the jar size first)/*MIDlet-Name: SearchExampleMIDlet-Version: 1.0MIDlet-Vendor: MyCompanyMIDlet-Jar-URL: SearchExample.jarMIDlet-1: SearchExample, , SearchExampleMicroEdition-Configuration: CLDC-1.0MicroEdition-Profile: MIDP-1.0MIDlet-JAR-SIZE: 100
*/import javax.microedition.rms.*;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import java.io.*;
public class SearchExample extends MIDlet implements CommandListener{ private Display display; private Alert alert; private Form form; private Command exit; private […]
July 4th, 2007 | Posted in j2me source code, midlet, rms | No Comments
/*J2ME: The Complete Reference
James Keogh
Publisher: McGraw-Hill
ISBN 0072227109
*///jad file (please verify the jar size)/*MIDlet-Name: SortExampleMIDlet-Version: 1.0MIDlet-Vendor: MyCompanyMIDlet-Jar-URL: SortExample.jarMIDlet-1: SortExample, , SortExampleMicroEdition-Configuration: CLDC-1.0MicroEdition-Profile: MIDP-1.0MIDlet-JAR-SIZE: 100
*/import javax.microedition.rms.*;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import java.io.*;
public class SortExample extends MIDlet implements CommandListener{ private Display display; private Alert alert; private Form form; private Command exit; private Command start; […]
July 4th, 2007 | Posted in j2me source code, midlet, rms | No Comments
import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import javax.microedition.rms.*;import java.io.*;
public class RMSDemo extends MIDlet implements CommandListener {
private Display display; private RecordStore rs=null; private Command exit; private RecordEnumeration re; private int recordNO; Form frm; int index=0; […]
July 4th, 2007 | Posted in j2me source code, midlet, rms | No Comments
/*————————————————–* ViewPng.java** Download and view a png file** Example from the book: Core J2ME Technology* Copyright John W. Muchow http://www.CoreJ2ME.com* You may use/modify for any non-commercial purpose*————————————————-*/import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import javax.microedition.io.*;import java.io.*;
public class ViewPng extends MIDlet implements CommandListener{ private Display display; private TextBox tbMain; private Form fmViewPng; […]
July 4th, 2007 | Posted in graphics, j2me source code, midlet | No Comments
This example implements the following features in one Midlet:
Implementing Pie Charts and Bar Charts How to use multiple choices How to use exclusive lists
/* * @(#)Sample.java 1.9 01/06/08 * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved. */
import javax.microedition.midlet.*;import javax.microedition.lcdui.*;
/* * A quick sample of graphics, commands, and event handling. */public […]
July 4th, 2007 | Posted in graphics, j2me source code, midlet | No Comments
Images can be viewed as thumbnails on wireless devices. The method below creates thumbnails from images
private Image createThumbnail(Image image) { int sourceWidth = image.getWidth(); int sourceHeight = image.getHeight();
int thumbWidth = 64; int thumbHeight = -1;
if (thumbHeight == -1) […]
July 4th, 2007 | Posted in graphics, j2me source code, midlet | No Comments