How can we make a list editable?

╄→гoц情女王★ 提交于 2020-07-09 13:29:21

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!