Java JFrame buildLabel(JFrame frame, String txt, int x, int y, int w, int h)

Here you can find the source of buildLabel(JFrame frame, String txt, int x, int y, int w, int h)

Description

build Label

License

Open Source License

Declaration

private static JLabel buildLabel(JFrame frame, String txt, int x, int y, int w, int h) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.JLabel;

public class Main {
    private static JLabel buildLabel(JFrame frame, String txt, int x, int y, int w, int h) { //JLabel
        JLabel lbl = new JLabel();
        lbl.setText(txt);//  w  w w  .j  a v a 2  s .  com
        lbl.setBounds(x, y, w, h);
        lbl.setForeground(Color.yellow);
        lbl.setFont(new Font("Canadra", Font.BOLD, 22));
        frame.add(lbl);
        return lbl;
    }
}

Related

  1. allPlatformGetFile(String dialogTitle, File locationIn, final String fileExtension, FileFilter nonMacFileFilter, boolean allowMultipleSelect, JFrame parentFrame)
  2. askSave(JFrame frame)
  3. attachAccelerator(Action action, JFrame frame)
  4. btnMnemonicAndToolTip(JFrame frame, JButton a, JButton b, JButton c, JButton e, JButton h, JButton i, JButton l, JButton m, JButton o, JButton p, JButton s, JButton t, JButton enter, JButton altEnter)
  5. buildButton(String btnName, JFrame frame, int x, int y, int w, int h)
  6. buildTxtField(JFrame frame, int x, int y, int w, int h)
  7. calcLocation(JFrame main, JDialog dialog)
  8. calculateMaxMenuItems(JFrame window)
  9. calculateMaxMenuItems(JFrame window)