Solved

Editable JList

Posted on 2001-08-08
6
1,335 Views
Last Modified: 2012-08-13
I have an applet that has a panel that is made up a JList. This list is all populated with a data vector. Now, I would like to be able to edit the elements directly inside the JList. So maybe if I double clicked on an element in the list than a cursor would appear and then I could up date that particular list. Thus containing all editing of the JList within itself. I know I could use a combination of components to to so but what I invision is a PopUp menu that comes up on the JList that enable me to ADD,UPDATE,DELETE from the already populated JList for proper saving later on to a database.
0
Comment
Question by:thenopsis
6 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6366362
JList does not support what you want to do.

The easiest way to do handle this would be to instead use a single column JTable which can be made to look just like a JList.
0
 

Author Comment

by:thenopsis
ID: 6379819
Thanks for nothing.....Please do not propose an answer or comment with nothing in it at all. If you can help me out that would be greatly appreciated but please don't continue adding blank comments and/or answers.
0
 

Author Comment

by:thenopsis
ID: 6380544
objects,

Thanks for the input, I have tried what you suggested and for the most part I will be able to have the functionality that I require but do you know how to change whether or not a cell is editable in the JTable after the table has been created and placed on a panel to be viewed. I know that you can overwrite isCellEditable() from DefaultTableModel to specify which cells are editable at the time the JTable is constructed but after this point I can't figure out a way to make editable and of the cells previously set to non-editable.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 92

Accepted Solution

by:
objects earned 40 total points
ID: 6382361
You need to override isCellEditable and implement whatever editable policy you require.
0
 

Expert Comment

by:CleanupPing
ID: 9061906
thenopsis:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 20

Expert Comment

by:Venabili
ID: 9329880
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for objects

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question