• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing JList element

 
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!