Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2004

Tip: Looking for answers? Try searching our database.

Checkboxes in JList (how to)

Thread view: 
piomice - 09 Feb 2004 17:26 GMT
Hi,

Does anyone have good examples of how to create a JList with checkboxes?
 I found one dated 1999 but I think there might be a better way.

Any advice on how to do this is appreciated.
Andrew Thompson - 09 Feb 2004 17:39 GMT
....
> Does anyone have good examples of how to create a JList with
>   checkboxes? I found one dated 1999

What 'one' did you find?

>..but I think there might be a
> better way.

What makes you think there is a better way?

Is this your homework?

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
piomice - 09 Feb 2004 18:27 GMT
> ....
>
[quoted text clipped - 15 lines]
> * http://www.PhySci.org/codes/ Web & IT Help
> * http://www.1point1C.org/ Science & Technology

> What 'one' did you find?

This is the 'one' that I found:
http://www.codeguru.com/java/articles/567.shtml

> What makes you think there is a better way?

As I posted, it's dated 1999.  The JDK has undergone several revisions
since then -- that's what makes me think there 'might' be a better
method.  And since I haven't done this particular thing using Swing
before, I'm just asking.

> Is this your homework?

Is this unnecessary sarcasm??  I asked an honest question.  If you have
issues with my post (for some inexplicable reason) how about just saying
so?  By the way...I haven't had "homework" to do for about 12 years.
Chris Williams - 09 Feb 2004 19:42 GMT
> Hi,
>
[quoted text clipped - 3 lines]
>
> Any advice on how to do this is appreciated.

override the cellrenderer, make your your cell renderer extend JCheckBox.
piomice - 10 Feb 2004 15:32 GMT
>> Hi,
>>
[quoted text clipped - 5 lines]
>
> override the cellrenderer, make your your cell renderer extend JCheckBox.

That worked great.  Thanks Chris!
Chris Williams - 10 Feb 2004 16:20 GMT
>>> Hi,
>>>
[quoted text clipped - 7 lines]
>
> That worked great.  Thanks Chris!

no problem.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.