(turorial) TheButtons2.container.addComponent() hangs ?

I’m studying tutorial.

I’ve add in
WindowOpener
"
final TheButton2 theButton = new TheButton2(this);
" with Button2 a copy/past class from tutorial

TheButtons2.container.addComponent()
hangs
( If I comment line in
WindowOpener
it’s OK)

What I’ve misunderstood?
Thanks for your help
cl-r

[color=#ff0019]
Eclipse errorlog :
eclipse.buildId=I20110613-1736
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

Error
Tue Aug 23 16:35:04 CEST 2011
Terminate compilation called when no compilation was active

Console :
java.lang.UnsupportedOperationException
at com.vaadin.ui.CustomComponent.addComponent(CustomComponent.java:218)
at com.example.apprentissage.TheButton2.(TheButton2.java:85) —>
container.addComponent(thebutton);

at com.example.apprentissage.WindowOpener.(WindowOpener.java:27)
[/color]

Please show some more code,
probably the object you are trying to add TheButton2 to is not a valid vaadin container, but some other object.

André

I was confusing the use of
this (CustomComponent)
,
window
or
mainWindow
and
layout
(the good one).
Thanks, you gave the good analysis, I can now continue to discover vaadin.
cl-r