GreetingApplet: Placing GUi objects public class GreetingApplet extends Applet private label prompt private label greeting; Declaration private TextField inputlinei public GreetingApplet( prompt new Label (Please enter your name")i greeting new Label( )i inputline new TextField( 15 )i add( prompt )i These statements add( greeting place Label and add( inputline )i TextField objects on this applet C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 5-5© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 5 - 5 GreetingApplet: Placing GUI Objects public class GreetingApplet extends Applet { private Label prompt; private Label greeting; private TextField inputLine; public GreetingApplet( ) { prompt = new Label(“Please enter your name”); greeting = new Label( ); inputLine = new TextField( 15 ); add( prompt ); add( greeting ); add( inputLine ); } } These statements place Label and TextField objects on this applet. Declaration