How can I change background color of JTextField?
Thanks,
Gil
Roland - 11 May 2005 22:51 GMT
> How can I change background color of JTextField?
>
> Thanks,
>
> Gil
JTextField tf = new JTextField();
tf.setBackground(Color.RED);
tf.setForeground(Color.WHITE);
tf.setText("White text on red background");

Signature
Regards,
Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
Arnaud Berger - 12 May 2005 07:29 GMT
Hi,
The javadoc for JTextField would have helped
cf. setBackground(Color color)
Regards,
Arnaud
> How can I change background color of JTextField?
>
> Thanks,
>
> Gil