Article View: borland.public.jbuilder.java.swing
Article #12976Re: disabling JTextField
From: Vasudevan Srinivasan
Date: Wed, 14 Oct 1998 00:00
Date: Wed, 14 Oct 1998 00:00
23 lines
1158 bytes
1158 bytes
never mind.
i added a jtxtField.repaint() and it works fine now.
Vasudevan Srinivasan wrote:
> Hi,
> I have a JCheckBox which dictates the enabling/disabling of another
> JTextField.
>
> jchkbox.addChangeListener(ChangeListener() {
> public void stateChanged(ChangeEvent ce) {
> jtxtField.setEnabled(jchkbox.isSelected());
> }
> });
>
> the enabling/disabling works properly but the color is not changed
> immediately. For e.g when jtxtField becomes disabled the Text is still
> in black color, but on refocus on it, it is grayed and viceversa.
>
> is there any other property im unaware of ?
>
> thanks
Technical Details
Message-ID:
<3624D26B.58C8C4EE@netrisk.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3624CC97.5E98386C@netrisk.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,4467d66d8634e2cd X-Google-Attributes: gid111d45,public From: Vasudevan Srinivasan <vasudevan@netrisk.com> Subject: Re: disabling JTextField Date: 1998/10/14 Message-ID: <3624D26B.58C8C4EE@netrisk.com> X-Deja-AN: 401033744 Content-Transfer-Encoding: 7bit References: <3624CC97.5E98386C@netrisk.com> Content-Type: text/plain; charset=us-ascii Organization: NetRisk Inc. Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing