Chapter 8, Rendering
#64 Turn the Spotlight on Swing
If you have ever been to a comic show, to the theatre, or to the circus,
you’ve probably noticed how spotlights are used to move your focus to a
particular location on the stage. A search operation can be compared to a
theatre stage, where actors have been replaced by search results. You just
need to get the user to focus on the right location.
Take a look at an example application, shown in Figure 8-12, which dis-
plays a predefined set of books and lets you search for one or more of them
by entering a search query in the text field at the bottom of the window.
Since the application is just a demo, you can only enter one of the following
queries: books, sci-fi, adams, and pratchett. Each query, when validated by
the Enter key, will find the related books and spotlight them, as shown in
Figure 8-11. All the problems provoked by mixing Java3D and Swing have been solved