• Post Reply Bookmark Topic Watch Topic
  • New Topic

[URGENT]Making an Editable JList

 
Anirban dutta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
I want to have editable cells in a JList same as in JTable. Is it possible. Please help? Urgently needed.
Thanks and Regards
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to create a custom cell renderer for the JList to handle the editing. The JList section of the Swing Tutorial covers the basics. It defers to the combobox for an example, since they both use the same cell renderer interface.
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On second thought, you would probably be better off using a one-column JTable, as it provides an editor implementation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!