...and then... immediately, without any programming or fuss on your part, you can see your GUI with the look and feel of your choice. Here's my TopComponent with the cool Napkin Look and Feel (or, as someone in Munich referred to it, when I demoed it there at the Siemens conference a few months ago, the "Manager's Look and Feel"):
In the first screenshot above, everything above the line, in the "Preview Design" menu, is provided by default. Everything below the line was registered by me. So, you can now register a look and feel in the IDE. After you've done so, the look and feel appears in the "Preview Design" menu. And how do you register a look and feel? Nothing simpler. Point and click, that's it. Just download the JAR from the look and feel's website, and then go to the Swing/AWT Palette Manager (under the Tools menu):
First, notice that there are now more categories, because the Matisse update pack has broken the looong list of Swing components into more manageable categories (matched in the Component Palette). By the way, this reorganization is going to help me in demonstrations—in the heat of the moment, I can never find the JLabel or the JTextField, in that enormous list. Now that enormous list is a lot less enormous, so the chances of me finding the components I need without looking like an idiot are at least larger than before.
But, anyway, apart from the reorganized Swing components, there's a new category, right at the end, called "Look and Feels". You'll also find it in the Component Palette, but you need to do something special (that I haven't yet worked out) to make the drag and drop work (I'm assuming it is possible, otherwise that category wouldn't be in the Component Palette). So, all you do is click "Add from JAR". A wizard opens, you browse for your JAR file (the one from the look and feel's website) and click Next. Then you wait a few seconds while all the classes in the JAR file are loaded. One they're loaded, you get a screen containing all the classes in the JAR file. Then you need to select the class/es called xxxLookAndFeel. For example, for Napkin, choose this one:
For Lipstik, choose this one:
Sometimes, as with JGoodies (below), you might have several choices:
(Maybe the IDE should only load classes called xxxLookAndFeel, except that, I guess, there's no law saying that a look and feel provider must call the relevant class xxxLookAndFeel.)
After that, click Next and then choose the category (i.e., this must be "Look and Feels", as far as I can tell, which implies that this step shouldn't be necessary) where you want to put the look and feel. Then... the wizard is finished, the look and feel will appear in the "Preview Design" menu, and you can preview your TopComponent as described above.
Pretty handy, if you quickly want to make sure that your u.i. is going to look okay in multiple different look and feels. Now, what would be really nice is if you could select a default look and feel and then use a keyboard shortcut to invoke the preview design... And something else: How about seeing the same TopComponent simultaneously in multiple look and feels?
In other news. Oops. I guess I forgot about the "Keyboard Shortcut of the Week"! Watch this space tomorrow (and send me an e-mail with nominations for this prestigious award).