Example usage for javax.swing JPasswordField setColumns

List of usage examples for javax.swing JPasswordField setColumns

Introduction

In this page you can find the example usage for javax.swing JPasswordField setColumns.

Prototype

@BeanProperty(bound = false, description = "the number of columns preferred for display")
public void setColumns(int columns) 

Source Link

Document

Sets the number of columns in this TextField, and then invalidate the layout.

Usage

From source file:com.eviware.soapui.support.components.SimpleForm.java

public JPasswordField appendPasswordField(String label, String tooltip) {
    JPasswordField textField = new JPasswordField();
    textField.setColumns(defaultTextFieldColumns);
    textField.setToolTipText(StringUtils.defaultIfEmpty(tooltip, null));
    textField.getAccessibleContext().setAccessibleDescription(tooltip);
    append(label, textField);/*from ww w.j a  v a  2s .c  o  m*/
    return textField;
}