Results 1 to 1 of 1
- 05-18-2010, 03:42 PM #1
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
applicaton for nokia S60 devices(Translator), need help
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.
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.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) { } }
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.
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.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) { } }
Thank you.
Similar Threads
-
java spanish translator needed for jni
By Nicholas Jordan in forum Jobs OfferedReplies: 5Last Post: 08-11-2009, 03:43 PM -
On-Device Debugging for nokia devices using J2ME.
By srikant_ in forum CLDC and MIDPReplies: 0Last Post: 05-27-2009, 11:03 AM -
Custom Font Translator
By Nerdopolis in forum New To JavaReplies: 3Last Post: 04-18-2009, 03:50 AM -
Translator hashtable
By editor35 in forum New To JavaReplies: 1Last Post: 01-11-2009, 02:02 AM -
Java multilanguage translator
By mnprakash in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 01-05-2009, 08:13 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks