• Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic Question For JList

 
Hugo Cruz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know how to remove or clear all the elements already contained in a JList structure.
I have tried with Jlist.removeAll but the items are still there
thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After a removeAll() (just like most calls that change the structure of a Java GUI) you need to call validate() on the container to tell it to redo the layout.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!