help Menu Bar

hi all,

iam new using vaadin,

i try use this , but the gave error in
MenuBar menubar = new MenuBar();

main.addComponent(menubar);
(error)
main cannot be resolved, how cross this error.

Regards,
ihung.

Hi,

I suggest reading the Book of Vaadin, tutorials and examples to get to know Vaadin. I assume that you are also new to Java. Vaadin is an excellent way to learn Java, but you might want to read some basic Java tutorials as well.

The error: the definition of the “main” reference is probably undefined. You need to define it, for example:

VerticalLayout main = new VerticalLayout();
setContent(main);