This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)  RSS feed

 
Ranch Hand
Posts: 71
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 71
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!