X

Geertjan's Blog

  • September 8, 2007

82 New NetBeans Samples... Free!

Geertjan Wielenga
Product Manager
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!

Join the discussion

Comments ( 5 )
  • Fabrizio Giudici Saturday, September 8, 2007

    > ... that I imagine Fabrizio's blueMarine might find very useful.

    In fact :-) They are on my todo list - will be surely in for the JavaPolis presentation (and something hopefully sooner).


  • Fabrizio Giudici Saturday, September 8, 2007

    BTW, people with NetBeans 6M10 or later can quickly create a setting for exploring Chet and Romain's stuff. Perform these steps:

    + Project Group / New Group

    + Folder of Projects

    + Select the directory where you unzipped the code

    + Wait almost forever (this feature needs a good optimization ;-)

    Et voilà. All the projects are visible in the "Projects" explorer and you can switch back to this mode whenever you want by selecting the newly created group (of course it is convenient that you create groups also for your own projects).


  • Geertjan Monday, September 10, 2007

    Thanks Fabrizio, that's a great tip! And I'm looking forward to reading in your blog about how you incorporated the Filthy Rich Client samples into your application, to see what I can learn from that!


  • Javier Scappini Thursday, September 13, 2007

    Wow! This is cooooool... Just want to thank you for make this Open, so beginners (like me, of course! :-D ) can "taste" what you can do with just imagination and hard (but passionate) work...

    Thank you!

    Keep on rockin'!


  • Sébastien Saturday, September 15, 2007

    Cool stuff!

    I'm currently reading Filthy Rich Clients and for you all, don't hesitate, if you want to learn more about swing, java 2d and graphics stuff (and much much more), order it right now, it's a gold mine, really :)

    Have a nice day \^\^


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.