Search code examples
javaswingnetbeanscolorsjlabel

Jlabel color change


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);

Solution

  • Simply the code is

    jLabel1.setForeground(Color.red);