-
JList problem
help me !
i have read through the JDK specifications but it doesn't tell me how to
1) get all contents in a JList
2) remove one or all contents in a JList.
3) add a value to a JList during runtime
4) sort the contents in the JList
why ?
pls help
Signature (up to 100 characters) You may use Markup in your signature
-
Re: JList problem
You must do this through the JList's model.
To do an update to the model, you must extends DefaultListModel and then expose the fireContentsChanged methods since they are protected. You can get the ListModel by making a call to getListModel on the JList.