Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JList and ListCellRenderer...

Posted on 1998-09-23
2
Medium Priority
?
327 Views
Last Modified: 2008-02-20
I want to create a ListCellRenderer for a JList that consists of a JCheckBox and a JTextField.  How can I do this, and also how can I set the checkboxes selected, deselected, and find out which ones are selected and not selected?
0
Comment
Question by:beemer
2 Comments
 
LVL 4

Accepted Solution

by:
evijay earned 100 total points
ID: 1224867
You cannot use JList to do this since the JList has cells for which you can attach List cell renderers not editors. You have to go for JTable with one column for achieving the same effect. JList is used for selecting one/m out of n known values and not for inputting some text etc.,.
JTable is the correct component for that purpose.


0
 

Author Comment

by:beemer
ID: 1224868
How can I do this with JTable?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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.
Suggested Courses

876 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