List of utility methods to do JTextField Size
void | adjustSize(JTextField textField) adjust Size textField.setPreferredSize(new Dimension(0, FIELD_HEIGHT));
|
JTextField | fixTextFieldSize(JTextField field) fix Text Field Size final Dimension size = field.getPreferredSize(); size.width = field.getMaximumSize().width; field.setMaximumSize(size); return field; |
void | fixTextFieldsSize(JTextField... jTextFields) fix Text Fields Size for (JTextField field : jTextFields) {
fixTextFieldSize(field);
|
void | setMinimumSizeFromCols(JTextField component) set Minimum Size From Cols int columns = component.getColumns();
component.setColumns(0);
setMinimumSize(component, columns);
|