Article View: borland.public.jbuilder.java.swing
Article #12295JList and JCheckBox
From: Vasudevan Srinivasan
Date: Thu, 28 Jan 1999 00:00
Date: Thu, 28 Jan 1999 00:00
14 lines
1220 bytes
1220 bytes
Hi, I am trying to create a JList with JCheckBoxes instead of usual labels, making multiple selections more user friendly. I am having a problem when I implemented the ListCellRenderer. It seems the getListCellRenderer component is called twice (1 for pressing the mouse and 2 for releasing it) and also the isSelected value is false when the focus is out of the current check box (even though there is a seperate cellHasFocus param). so the list box behaves as if only one can be selected. I tried capturing mouseClick events to prevent press and release, but they are not captured at all. Is there any way this can be implemented? Thanks Vasu
Technical Details
Message-ID:
<36B11588.99200A76@worldnet.att.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,944f205c85217f2b,start X-Google-Attributes: gid111d45,public From: Vasudevan Srinivasan <vasya10@worldnet.att.net> Subject: JList and JCheckBox Date: 1999/01/28 Message-ID: <36B11588.99200A76@worldnet.att.net> X-Deja-AN: 438173808 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: vasya10@worldnet.att.net Newsgroups: borland.public.jbuilder.java.swing