Java tutorial
//package com.java2s; import java.awt.Color; import java.awt.Font; import javax.swing.JLabel; public class Main { public static void errorLabel(JLabel label) { label.setForeground(new Color(192, 0, 0)); italicBoldLabel(label); } public static void italicBoldLabel(JLabel label) { label.setFont(label.getFont().deriveFont(Font.BOLD + Font.ITALIC)); } }