Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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!
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!