Important: The Java API for Cocoa is deprecated in Mac OS X version 10.4 and later. You should use the Objective-C API instead. For a tutorial on using Cocoa with Objective-C, see Cocoa Application Tutorial.
The buttons and text fields in the Currency Converter window come with many built-in behaviors. Notice that the Convert button pulses as is the default for Aqua buttons that respond to Return key presses. Click the Convert button. Notice how the button is highlighted momentarily.
If you had buttons of a different style they would also respond in characteristic ways to mouse clicks.
Now click in one of the text fields. See how the cursor blinks in place. Type some text and select it. Use the commands in the Edit menu to copy the selected text and paste it in the other text field.
Do you recall the nextKeyView connections you made between the text fields in the Currency Converter window? Insert the cursor in a text field, press the Tab key, and watch the cursor jump from field to field.
Last updated: 2006-10-03