I'm a dot net developer. And recently forced to do something in j2me.
We have app in j2me for working with SMS-Text-Message and make different UI based on these sms. In this app form create manually with Canvas
.
There are several operations (which executable via selection of different options by user) in each canvas. Some of these operation create new canvas
(something like multi Form show ).
Is there solution to define event in each canvas form and then after calling so some operation (like create new canvas).
More Info:
For Example I have blow Code (Canvas-Form):
public void keyPressed(int key) {
if (key == -3) {
// call OK-event
}
}
It means when user input specific key like, event call to back to base midlet
.(in this case Canvas-Form
and midlet
are in different java classes).
To do this in Dot net, We define event in Canvas-Form
, then call it. Also we handle that event in midlet-class
and write own code int that handle-method
So my Question Is How do same thing's in J2me?
More and More Additional Info(Update 2)
My knowledge about java and j2me is less than Alga knowledge about this:). So maybe my question seems ridiculous. But my Question has these parts:
1) Define Event (I don't know how!)
2) Call Event (where I write call OK-event
comment in code sample)
3) Handle Event Method (I don't know how!)
I my search, I see a lot of examples how to define event with command. But in canvas form should I define Command
to do this or, no need to Command
because I draw buttons in canvas. I hope someone can understand my problem with this description.
And hope it prevent Downvotes :)