Skip to main content

Bringing life to Swing desktop applications - teaser 2

Posted by kirillcool on April 28, 2007 at 2:44 PM PDT

If you were not convinced by the first teaser, here's one more reason to come and hear me and Alex presenting the Bringing Life to Swing Desktop Applications technical session (TS-3414). We will be talking about different techniques to bring your Swing application into the 21st century, and here is a simple implementation of SpotLight for Java desktop applications using the JXLayer:

Note how

  • The selection is synced with the search string
  • Only the matching items have rollover effects
  • The search string is applied on folder change
  • The selection is synced on icon resize
  • Soft clip on the selection edges

How much code is it? About 30 lines for the clip painter (half is for the actual translucent gray painting + soft clipping), about 20 lines to keep the selection and search text field in sync and three listeners that call the sync method (about 10 lines in total).

See you at JavaOne