Window Alignment with respect to button

I have a button component. I want to open a popup/window always aligned to it.

How to do that?

How about using
PopupView
instead?

any documented example or sample on how it looks like etc?

You can find some test cases/examples in
http://dev.vaadin.com/svn/versions/6.2/tests/src/com/vaadin/tests/tickets/Ticket1397.java
.

Here’s an online demo as well (all the “Click me” items are PopupViews):
http://uilder.virtuallypreinstalled.com/run/PopupViewDemo/