87.2k views
3 votes
How to have grey font in java swing.

1 Answer

6 votes

Answer:

How do I change the font color in swing?

To set the font and color of JTextArea we can use the setFont() and setForeground() methods of the JTextArea . To create a font we must define the font name, the font style and its size. For the colors we can uses the constant color values defined by the Color class.

Step-by-step explanation:

User Gwynne
by
5.8k points