Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically displayed JList

Status
Not open for further replies.

pipk

Programmer
Feb 20, 2001
455
GB
I have a Swing GUI containing and JList within a JScrollPane. It looks great, but I wanted to add some functionality that would mean adding and deleting stuff from the JList (it is the front view of a database). How can I dynamically add and remove items from a JList and have these changes automatically reflected on screen by having them appear/disappear within the JList.

Many Thanks

pipk ::)
 
I am overwhelmed by the number of posts to this. phew, take me ages to sort through this lot. Not to worry, I have found an example in an O'Reilly swing book that uses a DefaultListModel, and it works a treat.

If anyone needs it let me know and I will send it.

cheers for looking in anyway

::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top