wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Updating a JList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Updating a JList" Watch "Updating a JList" New topic

Updating a JList

Frank Hale
Ranch Hand

Joined: Mar 25, 2000
Posts: 230
What is the proper method of updating a JList. I have a custom list model based on AbstractListModel. I'm using JDK 1.3 and I see it has a ListDataListener interface. Is this what I need to use? I however do not see an addListDataListener method in JList. For now I've been using setModel to set the model again when it changes but is this the proper or best way to do it?
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
A similar question is answered here.

"I'm not back." - Bill Harding, Twister
It is sorta covered in the JavaRanch Style Guide.
subject: Updating a JList
Similar Threads
Count items in JList
updating view based on model changes automatically
cant i change LAF at runtime?
Scrolling in Java
JList width