Im a beginner

Hello, I am a beginner and I want to learn from this tutorial: in 9:50 he has the same code as me, but I get some errors: “Cannot resolve constructor ‘HorizontalLayout(java.awt.TextField, com.vaadin.flow.component.button.Button)’”, why?

you have imported the wrong TextField (java.awt instead of com.vaadin)

uh, yes, my fault

It looks like you might be using IntelliJ IDEA. If so, you could make it so import suggestions don’t provide the java.awt package for similar fields. If not IntelliJ, then whatever IDE might also include a similar config.

I tend to do exactly that, exluding awt and swing helps pick the right import. Of course, if you do swing/awt programming as well, it’s not as helpful :slightly_smiling_face: