You will not be calling these methods directly, but indirectly throught the Reflect lookup mechansism. This is the essence of last four sections of exercises. Given a String, mName which names the method, the Class object for ChoiceApplet04 can call getDeclaredMethod to get a Method object, m . Just for tidiness, you'll want to keep the text displayed in the TextField consistent with the selection in the Choice component and vice versa. Once you get the hang of inner classes, events and event listeners, you'll be on solid ground for programming JDK 1.1 applications and applets.
Reflection is worth knowing about in certain situations.
As mentioned if your are building programming environments and tools that need to find out the capabilities of classes at run time, you'll find Reflection is indespensible. For typical programs, however, you should focus on the new event model. You can use TestChoiceApplet04.html to test the applet. Program Source Code A makefile for this lesson automates source code compilation, JAR file construction, and copying of JAR files to the appropriate BeanBox directory. You'll have to edit several of the variables in the makefile to indicate the location of your JDK 1.1 and BDK installation directories.