Java JTextField createFieldWithLabel(String label, JTextField textField)

Here you can find the source of createFieldWithLabel(String label, JTextField textField)

Description

create Field With Label

License

Open Source License

Declaration

public static JPanel createFieldWithLabel(String label, JTextField textField) 

Method Source Code


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

import javax.swing.*;
import java.awt.*;

public class Main {
    public static JPanel createFieldWithLabel(String label, JTextField textField) {
        JPanel p = new JPanel(new BorderLayout());
        textField.setMinimumSize(new Dimension(500, 50));
        p.add(new JLabel(label), BorderLayout.WEST);
        p.add(textField, BorderLayout.CENTER);
        return p;
    }//from www. ja v  a2s  .co m
}

Related

  1. bindPropertyChangeListener(final JTextField field, final String name, final PropertyChangeListener listener)
  2. browseFileForField(JTextField textField, JFileChooser fileChooser, Component parent)
  3. checkJTextFieldNotEmpty(javax.swing.JTextField field, javax.swing.JLabel promptName, ArrayList errors)
  4. cleanTextFields(JTextField... textFields)
  5. createBrowseButton(final JTextField txtInput, final Window parent, final boolean directoryBrowser)
  6. createOutputPanel(JLabel outputFileNameLabel, JButton chooseOutputFileButton, JTextField outputFileTextField, String borderTitle)
  7. dateCompleteOnlyFormat(JTextField pJTextField, KeyEvent e)
  8. doAction(JTextField textField)
  9. fieldSetErrorVisual(final JTextField field)