This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads 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!