aspose file tools*
The moose likes Java Micro Edition and the fly likes Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)" Watch "Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)" New topic
Author

Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)

Vinicius Souza
Ranch Hand

Joined: May 18, 2011
Posts: 45

Hi people!
Lets me try to explain whats my problem:
Ive make this interface below:

In a Form I implements this interface because I need a CustomButtom class called CommandButtom Ive created call this methods when that methods occurs on the buttom.
See bellow:

You see? I need to call this events so my form will do some action. Ive a private variable called "listener" thats a reference to the Form. Do you undestand ? Its so difficult explain a thing like tha when your first language is not english hehheeh. Thanks in advance!


Java is the best (I love C too) heehhh
Walter Gabrielsen Iii
Ranch Hand

Joined: Apr 09, 2011
Posts: 158
Do you use this method?

javax.microedition.lcdui.Item.notifyStateChanged()

javax.microedition.lcdui.CustomItem:
Finally, subclasses are responsible for calling Item.notifyStateChanged() to trigger notification of listeners that the CustomItem's value has changed.
Vinicius Souza
Ranch Hand

Joined: May 18, 2011
Posts: 45

Walter Gabrielsen Iii wrote:Do you use this method?

javax.microedition.lcdui.Item.notifyStateChanged()

javax.microedition.lcdui.CustomItem:
Finally, subclasses are responsible for calling Item.notifyStateChanged() to trigger notification of listeners that the CustomItem's value has changed.

Thanks for helping! My solution for this problema was:
An interface:

And a method call to the Form who implemented the interface:

That's it!
Thanks!
 
wood burning stoves
 
subject: Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)