480,972 views
13 votes
13 votes
How to have grey font in java swing.

User Dested
by
3.1k points

1 Answer

11 votes
11 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 Blue Orange
by
2.8k points