The Java documentation from Sun Microsystems is the best place.
You may have this documentation on your computer already. If not, you can download it from Sun. Scan it to see how these notes relate to the official documentation. The purpose of these notes is to overview the Swing package. Look to the documentation for complete coverage.
Here is one (of several) constructors for JTextField
.
The parameter says how many characters wide the field is.
JTextField( int numChars )
This program displays the frame at right.
Fill in the blanks so that the field is 15 characters wide.