Java Swing Font Set setTitleLabelFont(JLabel label)

Here you can find the source of setTitleLabelFont(JLabel label)

Description

set Title Label Font

License

Open Source License

Declaration

public static JLabel setTitleLabelFont(JLabel label) 

Method Source Code


//package com.java2s;
import java.awt.Color;

import java.awt.Font;

import javax.swing.JLabel;

public class Main {
    public static JLabel setTitleLabelFont(JLabel label) {
        return modifyLabelFont(label, Font.BOLD, 0);
    }//w w  w  .ja  v  a2 s. c  om

    public static JLabel modifyLabelFont(JLabel label, int style, int delta) {
        Font font = label.getFont();
        label.setFont(font.deriveFont(style, font.getSize() + delta));
        label.setForeground(new Color(140, 140, 140));
        return label;
    }
}

Related

  1. setHtmlFont(HTMLDocument doc, Font font)
  2. setItalicFont(JComponent jcomp)
  3. setLabelProperties(JLabel label, Color color, Font font, Color bg)
  4. setMonospacedFont(JComponent component)
  5. setSwingFont(Font font)
  6. setUIDefaultFont()
  7. setUIFont(final Font font)
  8. setUIFont(final Font font)
  9. setUIFont(Font f)