Article View: borland.public.jbuilder.java.swing
Article #12974disabling JTextField
From: Vasudevan Srinivasan
Date: Wed, 14 Oct 1998 00:00
Date: Wed, 14 Oct 1998 00:00
17 lines
983 bytes
983 bytes
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:
<3624CC97.5E98386C@netrisk.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,4467d66d8634e2cd,start X-Google-Attributes: gid111d45,public From: Vasudevan Srinivasan <vasudevan@netrisk.com> Subject: disabling JTextField Date: 1998/10/14 Message-ID: <3624CC97.5E98386C@netrisk.com> X-Deja-AN: 401027179 Content-Transfer-Encoding: 7bit Organization: NetRisk Inc. Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing