You must make your own customItem.
The paint method can draw image and drawString based on keypressed for textbox, you can also draw border around etc.
see that: http://developers.sun.com/techtopics/mobility/midp/ttips/customitem/
You can intercept the item focus and movement by implementing traverse method:
http://developers.sun.com/techtopics/mobility/midp/ttips/customitemtraversal/index.html
I am already working on somrthing like that. But now i want to make a pop up window which will shows all available emotions in it. And tell user to pick one. And the code of that pick will be entered in place on image.
How to do so. I tried to make a Image Selector but it am a new with J2ME. So io i failed. Can you tell me how to make an image selector for J2Me?
You must load in memory an image[][] matrix
You can make a canvas and display all the emoticon in a virtual matrix.
With this solution you must calculate the various coordinate of each image.
In alternative you can try the org.netbeans.microedition.lcdui.TableModel/items etc midp component (you can find it by installing netbeans + mobility pack)
when the user choose an emoticon you close the canvas and update the string message by adding the emoticon code and not showing this code in textfield.
I have parsed the input string from the user and and than get the image and text tokens and shown them in form. And it solved the problem. But now i am getting a new problem. I dont know how to go back to previous page. When i try to use form of previous page it give me error of security.
How to solve that. ?
I am using differnt classes i have a main calss which is a Midlet and than an other class which is a form. Now The midlet has its own form which display initial contents of the application. and than the Other Form class is called to display. But when i try to go back to midlet form The following error occur.
java.lang.SecurityException: Application not authorized to access the restricted API
at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+40)
at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+7)
at com.sun.midp.midletsuite.MIDletSuiteImpl.checkIfPermissionAllowed(+8)
at com.sun.midp.midlet.MIDletState.<init>(+83)
at javax.microedition.midlet.MIDletProxy.<init>(+5)
at javax.microedition.midlet.MIDlet.<init>(+13)
at com.kraysis.NokiaSMSSolution.WMAExample.<init>(+4)
at com.kraysis.NokiaSMSSolution.ImageTextField.<init>(+13)
at com.kraysis.NokiaSMSSolution.WMAExample$2.run(+23)
I think When i create an object of Midlet class than it give me this error.
Thanx for your support. But i have done it. I think WMA donot let Mildlets extended class to create instance. But any how i passed thr required fields like display and form as arguments to My handler class and get the required results. And i have done that. At last.
But now can you tell me how to check message receiving in a simulator?