public class BTextField extends TextWidget
In addition to the event types generated by all Widgets, BTextFields generate the following event types:
Constructor and Description |
---|
BTextField()
Create a new BTextField.
|
BTextField(int columns)
Create a new BTextField.
|
BTextField(java.lang.String text)
Create a new BTextField.
|
BTextField(java.lang.String text,
int columns)
Create a new BTextField.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumns()
Get the number of columns this text field should be wide enough to display.
|
javax.swing.JTextField |
getComponent()
Get the java.awt.Component corresponding to this Widget.
|
void |
setColumns(int columns)
Set the number of columns this text field should be wide enough to display.
|
getCaretPosition, getLength, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart, setText
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible
addEventLink, addEventLink, removeEventLink
public BTextField()
public BTextField(java.lang.String text)
text
- the initial text contained in the text field (may be null)public BTextField(int columns)
columns
- the number of columns this text field should be wide enough to displaypublic BTextField(java.lang.String text, int columns)
text
- the initial text contained in the text field (may be null)columns
- the number of columns this text field should be wide enough to displaypublic javax.swing.JTextField getComponent()
Widget
getComponent
in class TextWidget
public int getColumns()
public void setColumns(int columns)
Written by Peter Eastman.