Saturday September 08, 2007
82 New NetBeans Samples... Free!
Chet and Romain's "Filthy Rich Clients" teaches you how to create stunning visual and animated effects with Swing and Java 2D. By the end, you'll know all about graphics and animation fundamentals in Java, as well as advanced rendering techniques. Interestingly, the book's website, http://www.filthyrichclients.org/, provides a page from which you can download all the samples discussed in the book. And... all those samples, 82 in fact, are NetBeans projects! They're all quite small and really focused on one specific aspect, so they're really useful when you're learning about these things.
My two favorites are these, from Chapter 10, on Layered Panes:
Aside from the interesting techniques you can learn from these samples, there's something else, something very very cool—within about 5 minutes, you can port these samples to the NetBeans Platform. Why? To integrate the functionality into your own NetBeans Platform application, of course! (To do so, use the New Window Component wizard to create a TopComponent, transfer the interesting bits of the sample's JFrame to the TopComponent, and then copy the rest of the sample into your module project.)
The first of the samples above looks a lot like... a welcome screen, doesn't it? The images have amazingly smooth transitions and there's a lot of functionality exposed to (or, optionally, hidden from) the user, for customizing the spacing between the images and so on. The second one is cool too—it gives you a magnifying glass in a different layer to the images, and you can change the zoom level of the magnifying glass, so that you end up with a very nice effect, that I imagine Fabrizio's blueMarine might find very useful.
When moved to TopComponents and installed within the IDE, these two samples look as follows:
But, of course, they could be installed in any application on the NetBeans Platform (the NetBeans IDE is just one of these), such as the JFugue Music NotePad:
I'm investigating moving all Chet and Romain's samples to NetBeans modules, and providing them as NetBeans module project samples, so that NetBeans module authors can have all this cool functionality right at their finger tips, as NetBeans modules. But you can already use them as they are of course. Just download them, open them in the IDE, and then run them, that's it. No additional steps need to be taken. Apparently I'm on some kind of list of people who get sent books like this for review, so I should be getting the book within the next week or so. And then I'll report here on my new learnings. Thanks Chet and Romain for making all these cool samples available!
Sep 08 2007, 12:05:12 AM PDT Permalink


