Java JFrame buildTxtField(JFrame frame, int x, int y, int w, int h)

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

Description

build Txt Field

License

Open Source License

Declaration

private static JTextField buildTxtField(JFrame frame, 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.JTextField;

public class Main {
    private static JTextField buildTxtField(JFrame frame, int x, int y, int w, int h) { //JTxt
        JTextField txt = new JTextField();
        txt.setLayout(null);//from ww w  . ja v  a2  s  . c o m
        txt.setBounds(x, y, w, h);
        txt.setFont(new Font("Calibri", Font.BOLD, 20));
        txt.setForeground(Color.BLACK);
        txt.setBackground(Color.yellow);
        txt.setOpaque(true);
        txt.setLayout(null);
        frame.add(txt);
        return txt;
    }
}

Related

  1. askSave(JFrame frame)
  2. attachAccelerator(Action action, JFrame frame)
  3. 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)
  4. buildButton(String btnName, JFrame frame, int x, int y, int w, int h)
  5. buildLabel(JFrame frame, String txt, int x, int y, int w, int h)
  6. calcLocation(JFrame main, JDialog dialog)
  7. calculateMaxMenuItems(JFrame window)
  8. calculateMaxMenuItems(JFrame window)
  9. centre(JFrame frame)