Академический Документы
Профессиональный Документы
Культура Документы
Computing
By
P. Shiva Kumar(09031d2532)
A Regular PC
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
Creating a MIDlet
Extends MIDlet
Implements
CommandListener
public HelloMIDlet() {
mMainForm = new Form("HelloMIDlet");
mMainForm.append(new StringItem(null,
"Hello, Seminar Software Design!"));
mMainForm.addCommand(new Command("Exit",
Command.EXIT, 0));
mMainForm.setCommandListener(this);
}
Application
Sample Code
protected void startApp()
{
try
{
//home page
home.append(" "+"\n ");
home.append("Hello \n ");
home.append(source);
home.append("\n Welcome to Personal Health and Wellness");
home.addCommand(Exit);
home.addCommand(Register);
home.addCommand(SignIn);
home.setCommandListener(this);
Display.getDisplay(this).setCurrent(home);
Sample Code
Class.forName("com.mysql.jdbc.Driver");
//-----------------Connecting to database-------------