Jlabel color change

user2255507 picture user2255507 · Apr 8, 2013 · Viewed 60.4k times · Source

I tried to change the color of a jlabel in java netbeans

I need a code to change the jLabel color

Like:

JLabel.SetColor(Color.RED);

Answer

Abdelrahman Wahdan picture Abdelrahman Wahdan · Apr 8, 2013

Simply the code is

jLabel1.setForeground(Color.red);