How to add dynamic data in the renderer created using UI builder?

前端 未结 1 1845
一整个雨季
一整个雨季 2021-01-24 08:57

How to add dynamic data in the renderer created using UI builder?

create a render from ui builder and dynamic data to populate list.

protected boolean initListMo

相关标签:
1条回答
  • 2021-01-24 09:35

    The renderer doesn't contain the data only the logic for presenting the data. The model is the one that contains the data.

    To create a renderer check out this: http://www.codenameone.com/how-do-i---create-a-list-of-items-the-hard-way-gui-builder-renderer.html

    In that case your model needs to contain hashtables or maps with the keys being the names of the components and the values being the values for the specific entry.

    To update the model dynamically just use setItemAt on the DefaultListModel.

    0 讨论(0)
提交回复
热议问题