Java Reference
In-Depth Information
5 Using Final Classes and Methods (continued)
FIGURE 10-63b
FIGURE 10-63C
6 Creating a Callback Mechanism
Create the necessary Java source code files to implement a callback method from
two child windows to a parent window, as displayed in Figure 10-64. When the
user clicks the Display Child 1 button in the Parent for Callback Test window
(Figure 10-64a), that window is hidden and the Child One window is visible
(Figure 10-64b). When the user clicks the Go Back to Parent button in the Child
One window, the Child One window is hidden, and the Parent for Callback Test
window is visible (Figure 10-64a). The same action occurs for the Display Child
2 button and the Child Two window (Figure 10-64c). The Parent for Callback
Test window must implement an interface that provides a callback method.
 
Search WWH ::




Custom Search