Join IDNLearn.com and start exploring the answers to your most pressing questions. Find the answers you need quickly and accurately with help from our knowledgeable and experienced experts.

How to have grey font in java swing.

Sagot :

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.

Explanation: