Java Swing Font modifyLabelFont(JLabel label, int style, int delta)

Here you can find the source of modifyLabelFont(JLabel label, int style, int delta)

Description

modify Label Font

License

Open Source License

Declaration

public static JLabel modifyLabelFont(JLabel label, int style, int delta) 

Method Source Code


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

import java.awt.Font;

import javax.swing.JLabel;

public class Main {
    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;
    }/*w w  w.java  2 s . co m*/
}

Related

  1. makeFontBold(JComponent c)
  2. makeFontsPlain()
  3. makeHtmlPane(CharSequence text, Font font)
  4. makePlainTextPane(String text, Font font)
  5. mildFont(T comp)
  6. newLabel(String text, int fontStyle)
  7. renderComponent(JComponent comp, Font f, Color foregroundColor, boolean opaque)
  8. renderContainerComponents(JComponent comp, Font f, Color foregroundColor, Color backgroundColor)
  9. scaleFontIfApplicable(javax.swing.UIDefaults uiDefaults, java.util.Map.Entry entry, double scale)