<<< Common properties and methods for controls | Index | Displaying a form >>> |
JTextField is a component where user can type a single line of text data
Getting text from the control:
double dbl = Double.parseDouble( myTextField.getText() ); int value = Integer.parseInt( myTextField.getText() );
Setting the text in a control:
myTextField.setText( "HELLO" );
Moving focus to the control:
myTextField.requestFocusInWindow();
<<< Common properties and methods for controls | Index | Displaying a form >>> |