This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing JList element  RSS feed

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to change the text inside a
JList element?
Thanks,
Barry
 
Bill Liteplo
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change the original data (held in some Vector, array, etc.) from which your ListModel gets its data, then call fireContentsChanged on the model (must inherit from AbstractListModel).
There are other ways.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!