Color Jlabel at Color

Color Jlabel. How to set the color of a jlabel; * directly will not set the background color of jlabel.

Java Swing Components Studytonight
Java Swing Components Studytonight from www.studytonight.com

And in same way go to “ foreground ” option and choose font color whatever you want just describe and mention in bellow image. Setting the colour of jlabel; How to set color of font on jlabel.

Java Swing Components Studytonight

Using a jlabel and pass in html for the text: Set font and foreground color for a jlabel: Set color of text for jlabel. Use add method to add the jlabel to the frame.