Step 3


Sketch

This step is quite similar to the previous step. You need to write a createStringControl() helper method, declare a variable stringControl and add the control in the createControlPanel() helper method. The type for both the variable and the new helper method is JTextField. In the helper method, the JTextField constructor should be invoked with the string "Hit return after changes." as its only parameter. The preferred and maximum sizes of the control should be 160 by 50, and its border title should be "string". When you make these changes and recompile and run the applet, it should look like the following demonstration applet.

Demonstration Applet