| Author |
JList or JTable
|
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
In my application I currently have a JList with a list of names. I want to be able to edit/add the names. So I have 2 options that I know of: 1. Use a JButton and when clicked prompt user for a new name. Use a JButton for edit, and prompt the user to edit the selected name in the List. 2. Use a single column JTable and edit/add the names directly. Now for my question. Is there a way to edit an item in a JList in the same manner you can edit data in a JTable, direclty in the containing Cell? If not, I will probably end up using a JTable. But am just curious about the latter. Thanks. [ June 21, 2002: Message edited by: Gregg Bolinger ]
|
 |
Chantal Ackermann
Ranch Hand
Joined: Sep 28, 2000
Posts: 508
|
|
there is an example of an editable list: http://www2.gol.com/users/tame/swing/examples/JTableExamples3.html cheers
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Thanks for the reply. However, I don't believe that is an Editable JList. I believe that is a 1 column JTable that is actually editable. The JList on the left is updated by the JTable. But thanks anyway.
|
 |
 |
|
|
subject: JList or JTable
|
|
|