Hi to all,
Hope you all will be fine.First I want to tell you that i have an extensive knowledge of J2SE but i am new to J2ME. I want to create an application that is basically a translator. It is basically a very simple application but as i told you that i am J2ME newbie that's why i need your people help.Now come to the point.
Actually what this application will do is that it will ask you what is your choice, say SMS or Internet. If you choose SMS then it will take you another page(Actually i don't know that when you select SMS then how screen changes, means you need some sort of listener for this or it does automatically after selecting SMS choice).Anyways after selecting SMS option it will take you to new screen where in one text box you will write your text in English.There will be a button named translate under this text box and after clicking on translate it will connect you to the server that does the remaining processing and show the translation in another text box under translate button. And in case of selecting internet option it will directly connect you to server and show the result.
Actually it's an interface only.
As far as i know first i have to create option list like this.
Java Code:
public class ChooseOptions extends MIDlet {

    List options;

    public ChooseOptions(){

        String[] choices = {"SMS", "Internet"};
        options = new List("Please select your choice", Choice.EXCLUSIVE, choices, null);
    }
    public void startApp() {

        Display display = Display.getDisplay(this);
        display.setCurrent(options);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
}
Till now every thing is fine. But when i select SMS or Internet and press enter nothing happen. So i think i will have to write some action listenert for this. Means after selecting the option and press enter it took me to new page where text box, button and another text box present.

So please can you tell me how can i write listener for this.

And this is my second class. Although it is not complete but i want that when user select SMS or Internet it will come to this class. Means a new page show this class content on mobile screen.

Java Code:
public class Translation extends MIDlet {

    private Form form;
    private TextField txtField;

    public Translation(){

        form = new Form("Welcome to VectraCom translation Page");

        //Similar as using a textBox
        txtField = new TextField("Please enter text in English:", "", 50, TextField.ANY);
        form.append(txtField);
    }

    public void startApp() {

        Display display = Display.getdisplay(this);
        display.setCurrent(form);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
}
Also please tell me what exception i caught in text field so if user type number other then text then how can i catch it. Please tell me how i add button and another text box so after selecting button it connect to the server and show the result in another text box that is under the translate button. In other words how i write button listener.

Thank you.