Ok, finally got this working. Many hidden gotchas.
1. You have to make a Trust File for your custom panel. This is actually in the SDK, around page 53, so my bad -- but the problem is that there is no feedback from the Adobe application if you don't have this. The application just hangs. It should produce an error message "can't find trust file, etc.". This should not be that hard to implement.
2. The latest Flex SDK does not seem to work in Bridge CC or other similar applications. You have to use Flex SDK 3.x, apparently, and this is NOT in the documentation. Not only should you set the default SDK in Flex Builder to 3.x (I'm using 3.6) but you have to edit the build.properties file to make sure it's pointing to the correct folder, eg: C:/Program Files/Adobe/Adobe Flash Builder 4.7 (64 Bit)/sdks/3.6.0. Fortunately Flash Builder 4.7 comes with 3.6 installed. If you have an older version, it's likely to be completely different.
More info in this thread: http://forums.adobe.com/thread/1114153.