Re: JComboBox cell renderer doesn't render the top item
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Thu, 24 Nov 2005 12:34:43 GMT
On 24 Nov 2005 02:06:34 -0800, "hiwa" <HGA03630@xxxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :
>Below is an SSCCE for the problem. The renderer renders
>item text in the drop down list in italic font. But it doesn't render
>the top item of the box in italic. What could be the solution. T.I.A.
When I ran in on W2K 1.5.0_05, the various choices, including the top
one were all in italic. The value itself was not.
I added this correction to make the value itself italic.
jcb = new JComboBox(items);
jcb.setFont( jcb.getFont().deriveFont( Font.ITALIC+Font.BOLD ) );
jcb.setRenderer(new ItalicRenderer());
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- Follow-Ups:
- References:
- Prev by Date: Re: JComboBox cell renderer doesn't render the top item
- Next by Date: Re: JComboBox cell renderer doesn't render the top item
- Previous by thread: Re: JComboBox cell renderer doesn't render the top item
- Next by thread: Re: JComboBox cell renderer doesn't render the top item
- Index(es):