Chet and I gave a talk entitled “Material Witness” at Google I/O today. I am happy to announce that the entire talk is now available on YouTube. I have also published the following resources:

Google I/O 2014 demo

Google I/O 2014 Slides and Demo

Devoxx 2013

I just came back from Devoxx where Chet Haase and I gave a few talks on Android. The slides are now available online:

You can also download the Keynote versions of these presentations if you want to watch the embedded videos.

Devoxx 2013 presentations

I had the chance to spend two full days at Google I/O 2011 earlier this week and I enjoyed spending so much time talking with many Android developers. You guys are doing an amazing job and I can’t wait to download and use some of the apps you showed me!

Google I/O was also the occasion for me to give two presentations about Android with my friend and colleague Chet Haase: Honeycomb Highlights and Android Accelerated Rendering. I am happy to announce that the slides for both these sessions are now available.


Android presentations at Google I/O 2011

Chet Haase and I recently gave several presentations at Devoxx and the San Francisco Android user group. We’ve just posted the slides for two of these presentations:

These two presentations will teach you about development techniques we use every day on the Android team. The second one in particular shows what tools we use to track down performance issues. The videos of these two presentations are available on Parleys for registered users and will be available for free later next year.

Android Graphics, Animations and Tips & Tricks

I will be at Devoxx from November the 16th to the 20th to talk about Android. My session will explain how to write resolution independent applications. I will also introduce you to a new exciting graphics technology we’ve been working on.

Android at Devoxx 09

Google I/O and JavaOne are finally over and it’s a good thing, because after 5 sessions and 1 keynote, I was getting a bit tired :) The good news for you is that all of the Android sessions we gave at Google I/O are available online. You can watch the entire video recording of each session and download the slides as PDF files. The JavaOne sessions will probably be posted online later this summer.


Google I/O videos available

The next few weeks will be quite busy for me. I’ll be at Google I/O the last week of May in San Francisco to give a talk on Android entitled Turbo-charge your UI. If you want to learn cool techniques on how to improve the performance of your Android applications, that’s where you want to be! There will be other very interesting Android talks so if you are an Android developer or wish to become one, I can only encourage you to attend. To make things even better, the registration is actually pretty cheap.

The week following Google I/O, I will be at CommunityOne West, still in San Francisco, to talk about Android again. Actually, this will be (almost) the same talk as Google I/O. CommunityOne is always fun and it’s free.

Finally, I will be at JavaOne to deliver a session (twice) about animations with my good friend Chet Haase. This talk will be language-agnostic, but there will be demos, and the techniques we’ll discuss apply to Swing/Java 2D, Flex, Android, Java FX and any other UI toolkit. I don’t think we’re gonna give away Flex books this year but you’ll be able to laugh at Chet. I mean, laugh at his jokes.

Upcoming conference talks

Devoxx is unfortunately over but it was, as usual, awesome! Congratulations once again to the Devoxx team for their hard work and a fantastic result. I am really glad where the conference is going as this year it wasn’t only about Java. We thus got sessions on Flex, Silverlight, Groovy, Android… I can’t wait to go back next year to discover what else we’re gonna see.

Although I didn’t attend many sessions this week I really enjoyed what I saw about Flex. The ease with which you can apply animations, transitions and other various effects to live widgets is, not surprisingly, very appealing to me. Chet most notably showed how to apply PixelBender shaders to widgets and I can’t wait to give this a try. Benjamin also demonstrated his amazing Parleys Publisher tool, a video editing tool written in Flex/AIR. This tool can analyze a video stream and detect where the speaker changes slides to automatically create chapters. I would love to see the source code of that app.

I also enjoyed the session about, where Stephan presented various implementations of the player in Flex, GWT, JavaFX and iPhone. I was surprised and impressed by the visual quality of the GWT app, which was very close to the JavaFX version (the Flex implementation is one version ahead and richer, both in terms of visuals and features.) You can go try the current parleys player on

If you never went to Devoxx (well, JavaPolis), you really should try to go next year. It is a great event where you can meet very interesting people and enjoy Belgium beer.

Devoxx 08 Wrapup

I am very happy to say that I will be at Devoxx this year to give a couple of presentations about Android. The presentations are, very surprisingly, entitled Filthy Rich Android Clients. If you want to learn cool stuff about Android and/or if you want to see cool demos running on a real Android phone, come to Devoxx :)

Android talk at Devoxx

Sun has posted the slides and audio of Filthy Rich Clients 2008. Enjoy!

Slides and Audio for Filthy Rich Clients at JavaOne 2008

Chet and I just posted our JavaOne 2008 slides online.

Slides from JavaOne 2008: Filthier, Richer, Clientier

Chet and I will be presenting Filthy Rich Clients at JavaOne once again this year. We are excited and happily surprised by the high number of pre-registrations for our talk, the room is almost full already! However, if you plan on attending this session, make sure you check your schedule as Sun decided to move Filthy Rich Clients from Tuesday to Thursday late afternoon, to make room for some JavaFX thingies.

Also, we will be at the bookstore for a signing session. After our session, from 5:15pm to 5:45pm, if you have a copy of Filthy Rich Clients and would like us to scribble on it, come by and we’ll be happy to deface your book.

I will also probably spend some time at the Google booth where you can always stop by to chat about Google related stuff.

JavaOne, Talk and Signing Sessions

Chet and I are going to present another installment of Filthy Rich Clients at JavaOne 2008. We have a bunch of cool ideas for techniques and demos we would like to show you but I am very interested in hearing what you want to know about. If you have any visual effect, animation or graphics technique you would like to learn, please tell me and we’ll try to put it in our presentation.

What do you want to hear about?

I would like to apologize to the loyal readers of this blog for the lack of updates since last december. Android is a fascinating project which keeps me very busy at work and I would probably need to clone myself a few times to implement all the features I would like to see in it. I’ve also spent quite some time settling in my new life in California and this blog was the unfortunate victim of those time-consuming tasks. I do not despair coming back to my writings very soon. I can at least tell you that Filthy Rich Clients will be back this year at JavaOne, maybe with a surprise :)


Shannon, Chris and I showed many cool effects during this year’s Extreme GUI Makeover session, at JavaOne 2007. Since we cannot release the source code yet, I will explain some of the effects in detail. I will start with the blurred background displayed when a modal dialog shows up.

Blurring a dialog’s or a menu’s background is often used in video games to attract user’s attention to the front most widgets. Using this effect allows you to keep the context without suffering from the visual clutter it might induce. Adobe Flex offers a similar effect when you bring up a modal dialog in a Flex application. To better understand this effect, you can take a look at one of these two videos:

You can also take a look at the screenshot below. Note that the screenshot does not show the fade in and fade out animations used to bring up and dismiss the dialog. The background gradually blurs while the dialog progressively becomes visible.

Extreme GUI Makeover

Writing this effect is surprisingly easy with the help of the Timing Framework and SwingX. The former is used to drive the animations while the latter offers support for alpha translucency and blur.

The actual “dialog” is made of two classes, DetailsView and DetailPanel. The first class, DetailsView is used as a glass pane and is responsible for managing the animations and blurring the background. The second class contains the actual dialog, the black rounded rectangle in the screenshot. While DetailPanel contains interesting pieces of code, we will not spend any time on it in this entry. Simply note, however, that DetailPanel extends the JXPane class from SwingX. This class offers a public property called alpha which can be used to change the translucency of the container and its children.

Here is what the DetailsView class looks like:

public class DetailsView extends JPanel {
    private DetailPanel detailPanel;
    private BufferedImage blurBuffer;
    private BufferedImage backBuffer;
    private float alpha = 0.0f;

    DetailsView(DetailPanel detailPanel) {
        setLayout(new GridBagLayout());

        this.detailPanel = detailPanel;
        add(detailPanel, new GridBagConstraints());

        // Should also disable key events...
        addMouseListener(new MouseAdapter() { });

You can notice that we use two image buffers. They are used to create the animation of a gradually blurring background. The basic idea is to capture the frame’s content into a buffer, blur this buffer and paint it in the glass pane, behind the “dialog.” Unfortunately, doing so would be impractical for an animation. Even though SwingX provides an efficient blur filter, it would be very difficult to render a smooth animation of that size with it. Instead, we keep the frame’s content into an original buffer and blur that buffer into another buffer. At drawing time, we first paint the frame’s content, then the blurred copy. By progressively changing the opacity of the blurred copy, we can simulate an increasing blur effect.

Our first step is therefore to create our buffers:

private void createBlur() {
    JRootPane root = SwingUtilities.getRootPane(this);
    blurBuffer = GraphicsUtilities.createCompatibleImage(
        getWidth(), getHeight());
    Graphics2D g2 = blurBuffer.createGraphics();

    backBuffer = blurBuffer;

    blurBuffer = GraphicsUtilities.createThumbnailFast(
        blurBuffer, getWidth() / 2);
    blurBuffer = new GaussianBlurFilter(5).filter(blurBuffer, null);

This method relies on GraphicsUtilities and GaussianBlurFilter from SwingX to render a good-looking blur efficiently. Notice how the blurred buffer is downscaled before the filter is applied. This trick lets us reduce the blur’s radius, thus making it a lot faster. We just need to scale this image back to its original size at drawing time.

Drawing the back buffer and the blur buffer does not involve any complicated trick. We just set the bilinear rendering hint on the graphics context and rely on an alpha composite to perform the translucent drawing:

protected void paintComponent(Graphics g) {
    if (isVisible() && blurBuffer != null) {
        Graphics2D g2 = (Graphics2D) g.create();

        g2.drawImage(backBuffer, 0, 0, null);

        g2.drawImage(blurBuffer, 0, 0, getWidth(), getHeight(), null);

The most interesting part of this piece of code is the use of the field called alpha, that you saw in the first code snippet. This field is a float which holds a value ranging from 0 (no blur, transparent dialog) to 1 (blurred background, opaque dialog.) The animated effect is generated by modifying this value over time. To do this, we will use the trusty Timing Framework:

public float getAlpha() {
    return alpha;

public void setAlpha(float alpha) {
    this.alpha = alpha;

public void fadeIn() {

    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            Animator animator = PropertySetter.createAnimator(
                400, detailPanel, "alpha", 1.0f);
                new PropertySetter(DetailsView.this, "alpha", 1.0f));

For those of you who don’t know the Timing Framework, we are simply instructing it to animate two properties, both called “alpha,” on two different targets, this and the DetailPanel (remember, its alpha property is provided by its superclass JXPanel.) These properties are animated from their current value, 0.0f, to 1.0f over 400 milliseconds. The acceleration and deceleration are used to create a non-linear interpolation of the values over time and generate a more natural rendering.

That’s all there is to it! Dismissing the dialog is done with the fadeOut() method, whose code is almost exactly the same as fadeIn(). Instead of changing the properties from 0.0f to 1.0f, fadeOut() changes them from 1.0f to 0.0f. Remember to set DetailsView as the glass pane on your frame and your effect is ready to go.

Blurred Background for Dialogs (Extreme GUI Makeover 2007)

More photos from JavaOne 2007. From top to bottom: Kenneth Russel (Sun) and Patrick Hogan (NASA), Danny Coward (Sun), Tor Norby (Sun, Java Posse), Jasper Potts (Sun) and Richard Bair (Sun), Chris Campbell (Sun) and James Gosling.

World Wind Java

Danny Coward

Tor Norbye

Jasper and Rich


James Gosling

Photos From JavaOne 2007

From top to bottom: Thorsten Laux from Sun Microsystems, Joe Nuxoll from Apple/the Java Posse, Jay Zimmerman from No Fluff Just Stuff and a random dude.


Joe Nuxoll

Jay Zimmerman

Wifi Joy

More Photos from JavaOne 2007

The first two pictures below show Guillaume Laforge, Groovy‘s project manager, speaking at G2One, the Groovy event that took place during Community One for JavaOne 2007 (gotta love those ones.) The third picture show Chet, the funny guy with whom I co-authored Filthy Rich Clients. More pictures from JavaOne 2007 to come.

Guillaume Laforge

Guillaume Laforge at Groovy One


Guillaume Laforge and Chet Haase

The JavaOne 2007 website now offers the slides and the audio track of the Filthy Rich Clients presentation that Chet and I gave this year in San Francisco.

Slides and Audio Track for Filthy Rich Clients Available recently released a series of videos they captured during the Sun Tech Day 2007 in Paris. Among these videos, you will find a one hour session about Extreme GUI Makeover 2006 and yet another demo of Aerith. Both sessions are in French.

Extreme GUI Makeover Session Video

The JavaOne slides for the Desktop track are available. You can take a look at those from my sessions, Filthy Rich Clients (TS-3165) and Extreme GUI Makeover (TS-3548) right now :)

JavaOne Slides Available

Download the first video of Extreme GUI Makeover 2007, presented at JavaOne. This video shows what happens when an exception is thrown internally. This effect was inspired by applications that display cryptic error messages meant for programmers only. Because those messages usually expose the internals of the application, we thought it would be a good idea to show all of the internals… The internals shown in the video are an accurate representation of the application’s source code: cranky, rusty, patched, full of holes and made of gears that barely connect to one another.

Extreme GUI Makeover

Extreme GUI Makeover 2007 Video #1

JavaOne is over but I am still very busy so please be patient if you sent me an email about JavaOne demos. I received many requests and I will do my best to reply to each of you as fast as I can. Thanks a lot to all of you who sent me feedback about our JavaOne sessions, we really appreciate it!

Drowning In Mail

Jasper Potts put online a small tutorial on how to run Iris, the demo that Richard Bair, Ken Russell and he wrote for a keynote for JavaOne 2007. It’s a great mixup of Swing, applets, HTML and AJAX, a must see! Go check it out!

Richard, Ken and Jasper on stage

JavaOne Swing Keynote Demo