Article View: borland.public.jbuilder.java.swing
Article #12054Re: JComboBox colors when setEnable(false)
From: Jeff
Date: Mon, 01 Mar 1999 00:00
Date: Mon, 01 Mar 1999 00:00
28 lines
1160 bytes
1160 bytes
Extend JComboBox then override the method to do what you
want:
class myCombo extends JComboBox {
public void setEnabled(boolean theOption) {
super.setEnabled(theOption);
this.setForeground(Color.red);
this.setBackGround(Color.black);
}
}
Mike Michalowicz wrote:
> Someone please help...
>
> Mike Michalowicz wrote:
>
> > I want to disable a JComboBox, but change the colors
> > of the text/background when it is disabled.
> >
> > How to?
> > Mike
--
Jeff Etrick
ENSCO INC.
---------------------
Technical Details
Message-ID:
<36DA9A0F.F32F86C9@fl.ensco.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36CB2266.C5F29045@hekimian.com> <36D17288.C4D6E6F7@hekimian.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3bcc5802975a59fc X-Google-Attributes: gid111d45,public From: Jeff <jeffe@fl.ensco.com> Subject: Re: JComboBox colors when setEnable(false) Date: 1999/03/01 Message-ID: <36DA9A0F.F32F86C9@fl.ensco.com> X-Deja-AN: 449955013 Content-Transfer-Encoding: 7bit References: <36CB2266.C5F29045@hekimian.com> <36D17288.C4D6E6F7@hekimian.com> To: Mike Michalowicz <mmichalowicz@hekimian.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Ensco Inc Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing