问题
I want to make my JList
editable, what should I do?
回答1:
Use a 1-column JTable
instead.
回答2:
List Editor
回答3:
You can find the source code for an editable list here:
http://www.java2s.com/Code/Java/Swing-Components/EditableListExample.htm
Depending on your use case an JComboBox
, which is editable, might be a better solution than a JList
.
来源:https://stackoverflow.com/questions/1788552/how-can-we-make-a-list-editable