One itemStateChanged method for many displayables in j2me
Is it possible to use the itemStateChanged method to track the changes caused by the user for many of the displayables in a MIDlet (like a form and a list) using if options to decide what has changed, or do I need to create a different method for each displayable that I want track?
+3
source to share
1 answer
If you are talking about creating multiple forms and a single ItemStateListener and call Form.setItemStateListener () multiple times with the same parameter, then yes, you can do that.
In theory, you should write thread-safe code in your itemStateChanged implementation, but given how existing java-me implementations handle events and a very small number of MIDP-compatible phones using 2 physical screens, I don't think this is very important in practice.
+2
source to share