1. textfield.setForeground (myColor);

2. Your own L&F:

public class MyLookAndFeel extends MetalLookAndFeel
{
    public void initComponentDefaults (UIDefaults table)
    {
        super.initComponentDefaults (table);

        Object[] defaults = 
        {
            "TextField.foreground", myColor
        }

        table.putDefaults (defaults);
    }
}

-----Original Message-----
From: D. Michael Nelson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, June 07, 2001 11:13
Subject: Setting text color in the JTextField component?


>I want to change the text color from the default PLAF value to another
>color?  Any suggestions?
>
>Thanks In Advance,
>D
>
>
>
>_______________________________________________
>Swing mailing list
>[EMAIL PROTECTED]
>http://eos.dk/mailman/listinfo/swing

_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to