Java JTextField Focus _createJTextField(String name, FocusListener fl)

Here you can find the source of _createJTextField(String name, FocusListener fl)

Description

create J Text Field

License

Open Source License

Declaration

private static JTextField _createJTextField(String name, FocusListener fl) 

Method Source Code

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

import java.awt.event.FocusListener;

import javax.swing.JTextField;

public class Main {
    private static JTextField _createJTextField(String name, FocusListener fl) {

        JTextField jt = new JTextField();
        jt.setName(name);//from   ww w .j a  v a  2s .co m
        jt.addFocusListener(fl);

        return jt;

    }
}

Related

  1. addListenerToCommitOnFocusLost(final JTextField field)
  2. addNewFocusListenerForTextField(final JTextField textField, final Runnable r)
  3. attachListenerOnLabelClickFocusTextElement(JLabel label, final JTextField textField)
  4. clearOnFocus(final JTextField jtf, final String onlyInText)