Solved

JList and ListCellRenderer...

Posted on 1998-09-23
2
299 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 50 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
oracle 11g 23 107
servlet example issue 6 46
spring jars download 1 35
Setup GlassFish 4 22
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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 …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

828 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