Where is the class definition for TextField

A good answer might be:

In the Java Abstract Windowing Toolkit (the AWT).

Example GUI with TextField

Here is simple program that will have a TextField. When it runs it will show the GUI at left.

The constructor for TextField is part of the class definition (in the AWT) and looks like this:

TextField( int numChars ) 
The parameter says how many characters wide the field should be.
import java.awt.*; 
import java.awt.event.*;

public class TextEg1 extends _______
{

  _________ text = new _______________;

  TextEg1()                               // constructor
  {  
     setLayout( new FlowLayout() );       // choose the layout manager 
     add( text )
  }

  public static void main ( String[] args )
  {
    . . . . .
  }

  . . . . .
}

QUESTION 3:

Fill in the blanks so that the GUI has a field that is 15 characters wide.

Click Here after you have answered the question