Monsters

Blog | Photos

My name is Romain Guy and I am passionate about software, user interfaces and all things visual. Curious Creature hosts my work, mostly photographs and Swing UIs. You can feel free to contact me by email.

Repaint Manager Demos (Chapter 11)

The source code, demos and examples for the chapter 11 of Filthy Rich Clients are available online. This chapter presents the repaint manager.

Chapter 11 presents two demos, TranslucentPanel and ReflectionPanel The first one is an exercise for the reader showing why and when the user of a RepaintManager is necessary. The second one presents a component that can render real-time reflections of its children. The demo requires QuickTime for Java to add a reflection effect to a QuickTime movie streamed from the web. When QuickTime is not available, the demo reverts to regular Swing components.

Update: The final PDF of the book is available for purchase online \o/

Both screenshots below show what the demo looks like. As you can see, the reflection panel can be used with any component you fancy. All you have to do is add() your component inside the panel and you’re done.

Real-time reflection on a movie

Real-time reflection on Swing components


Posted by Romain Guy on Jul 22 2007 under Java, Swing, UI Design, Writing




8 Responses to “Repaint Manager Demos (Chapter 11)”

  1. radu Says:

    Gotta tell you, FRC is trés cool. Well done, Romain/Chet. Thanks to you guys, Java is nice again (after all the crap with generics, closures and all that BS).
    One question though that has nothing to do with FRC. I was reading the acknowledgments and I’ve seen Scott Violet mentioned twice. What’s up with him. He seems to have disappeared….

    Thanks,
    Radu

  2. viegs Says:

    Last I knew Scott left (I think it was in January or February) to Google. Hopefully he’s having fun.

    I know Shannon Hickey took over his work on JSR-295 (beans binding).

    ~Todd

  3. Romain Guy Says:

    That is true, Scott is now at Google. We are actually in the same building. Apparently I’m interning wherever he works :)

  4. radu Says:

    Good for him! And for you, Romain :) I wish he kept posting though…
    r

  5. Chet Haase Says:

    Hmmm - you’re interning at Google. Does that make you an extern at Sun?

    Chet.

  6. Brad Says:

    Ok let say I’m not so smrt.
    I can run the refections demo with the QuickTime Video from the command line, but when I run it through NetBeans I get the following exception when the call to makeQTJComponent is made

    java.security.AccessControlException: access denied (java.security.AllPermission )

    What should I have done?

    P.S. Sorry that I have to ask and I hope the book uses small words :(

  7. Romain Guy Says:

    I have no idea of what’s happening there. Just replace the call to makeQTJComponent() by new DummyPanel().

  8. Carl Says:

    I am still waiting for the book to ship. Boy is it taking forever.

    Great work Guys!

    -Carl

Leave a Comment