Overwritten Boolean in table cell
- From: "jupiter49" <jupiter49antiSPam@xxxxxxx>
- Date: Wed, 28 Dec 2005 20:35:16 -0500
Hi guys,
I'm using Swing to create a JTable with one column rendering a checkbox
(Boolean). Fine, this works because I have a custom table model that
overrides getColumnClass() and now everybody is happy figuring out how to
render a Boolean.
Now I'm not happy with white background so I create a new renderer class,
and I myTable.setDefaultRenderer(Boolean.class, new BooleanClassRenderer().
Fine, now I get my pretty color background.
But ....... (the big but) that pretty background overwrites the checkbox
which is now hidden until you use the editor to MouseDown on the cell. Then
the checkbox appears visible until you MouseUp.
How is this happening and how can I prevent it? I've tried a number of
things like new Boolean(true) in the renderer *after* setting the
background. This has me stumped and I don't know where to look for help.
Any ideas?
.
- Follow-Ups:
- Re: Overwritten Boolean in table cell
- From: hiwa
- Re: Overwritten Boolean in table cell
- Prev by Date: Re: Preserve Line Breaks
- Next by Date: Re: JTextArea not producing events
- Previous by thread: JTextArea not producing events
- Next by thread: Re: Overwritten Boolean in table cell
- Index(es):
Relevant Pages
|