Inside SWT

Tuesday, October 04, 2011

Flogging my FrankenMac

I'm running a FrankenMac. It's a MacBook Pro with Windows 7 and Linux as guest operating systems.

For my talk yesterday, I was showing Fx running as an Eclipse plugin on Windows and Mac. I grabbed a few standard Fx examples, modified them slightly and dropped them in. Here is the ColorfulCircle example running in Eclipse:



For the demo, I had a total 4 Eclipses (two Windows, two Mac) and 6 Fx embeddings, each doing some sort of animation on my machine. The source Eclipses were full development environments with the source of Fx loaded into them. For extra fear, the Mac Eclipses were running JDK7. There were a few browsers running too on both operating systems and the slide software.

You might think that it would lurch, but it didn't. Incredible.

Steve

Saturday, October 01, 2011

JavaOne

I'm speaking at JavaOne this year with Artem Ananiev. The title of the talk is "Using JavaFX 2.0 UIs with Swing and SWT". I've worked with Artem in the past but never actually met him. That's always cool.

Most of the hassles around interop with Swing and SWT were around threading. It was possible to embed one toolkit in the other, but programmers needed to be very careful to avoid deadlock. The rule of thumb was, "never wait" and use asyncExec() and invokeLater() to communicate between the two.

I'm happy to say that FX and SWT have no such hassles. Both are apartment threaded and share the same apartment.

Steve