Query about a simple J2me application- A programmer new 2 J2ME
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   abhi_abhi
Posted On:   Thursday, June 7, 2007 09:14 AM


i want to write a simple midlet that collect inputs
such as name , password etc. this should be saved as .txt
file in a local machine or a server. How to
write this simple midlet. i am using netbeans 5.5, and
have visual designer also.Please help me


Re: Query about a simple J2me application- A programmer new 2 J2ME

Posted By:   James_Heggs  
Posted On:   Thursday, June 7, 2007 11:37 AM

In terms of the MIDlet itself what kind of target device are you aiming for?

One of the tutorials I have found particularly useful is:

http://today.java.net/pub/a/today/2005/02/09/j2me1.html?page=2

The sample code for a basic MIDlet on there is as follows:



package com.j2me.part1;

import java.util.Date;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;

public class DateTimeApp extends MIDlet {

Alert timeAlert;

public DateTimeApp() {
timeAlert = new Alert("Alert!");
timeAlert.setString(new Date().toString());
}

public void startApp() {
Display.getDisplay(this).setCurrent(timeAlert);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}
}



But again these are more aimed at writing software for a Mobile phone or PDA hence Java Mobile?!

Eggsy
About | Sitemap | Contact