1. At the top of the screen i want it to have a textField where a person can enter their name
2. Below the text field i would like there to be 4 radio buttons
3. And finally i would like two textfields each on line below the radio buttons.
is this possible?...i can only seem to get either one or the other to work, my coding below is my starting point,
i am using sun java wireless toolkit: version 2.5.2
import java.io.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Commander extends MIDlet implements CommandListener
{
private Form form;
private Display display;
private TextField name;
private Command ok, exit;
public Commander(){
name = new TextField("Name:", "", 30, TextField.ANY);
ok = new Command("Ok", Command.OK, 2);
exit = new Command("Exit", Command.EXIT, 1);
}
public void startApp(){
display = Display.getDisplay(this);
Form form = new Form("Work Status");
form.append(name);
form.addCommand(ok);
form.addCommand(exit);
form.setCommandListener(this);
display.setCurrent(form);
}
public void pauseApp(){
}
public void destroyApp(boolean destroy){
notifyDestroyed();
}
public void commandAction(Command c, Displayable d) {
if(c == exit)
{
destroyApp(false);
notifyDestroyed();
}
}
}

New Topic/Question
Reply


MultiQuote


|