
Undocumented Secrets of MATLAB
®
-Java Programming398
Focus gained
Focus lost
6.6.1 The Listbox Data Model
The listbox model, retrieved via the getModel method or the Model property (get(jListbox,‘Model’)),
enables item manipulation. Using the getter methods or callback properties is always safe.
However, when updating simple listbox string items, it is better to update the HG handle’s String
property rather than the Model, since Model update breaks the connection between Java and
MATLAB items. The Model’s callbacks and methods include the following:
ContentsChangedCallback
◾ — red after listbox content items have changed.
Interv