Java Swing Font newLabel(String text, int fontStyle)

Here you can find the source of newLabel(String text, int fontStyle)

Description

new Label

License

Open Source License

Declaration

public static JLabel newLabel(String text, int fontStyle) 

Method Source Code

//package com.java2s;

import javax.swing.JLabel;

public class Main {
    public static JLabel newLabel(String text, int fontStyle) {
        JLabel label = new JLabel(text);
        label.setFont(label.getFont().deriveFont(fontStyle));
        return label;
    }//from w  ww  .j  a  v a2  s.  com
}

Related

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