Java Utililty Methods JTextField Size

List of utility methods to do JTextField Size

Description

The list of methods to do JTextField Size are organized into topic(s).

Method

voidadjustSize(JTextField textField)
adjust Size
textField.setPreferredSize(new Dimension(0, FIELD_HEIGHT));
JTextFieldfixTextFieldSize(JTextField field)
fix Text Field Size
final Dimension size = field.getPreferredSize();
size.width = field.getMaximumSize().width;
field.setMaximumSize(size);
return field;
voidfixTextFieldsSize(JTextField... jTextFields)
fix Text Fields Size
for (JTextField field : jTextFields) {
    fixTextFieldSize(field);
voidsetMinimumSizeFromCols(JTextField component)
set Minimum Size From Cols
int columns = component.getColumns();
component.setColumns(0);
setMinimumSize(component, columns);