Vaadin 12: Component not working

I have installed via maven a component from vaadin directory, in my case the component:

https://vaadin.com/directory/component/polymerelementspaper-button

<dependency>
   <groupId>org.webjars.bowergithub.polymerelements</groupId>
   <artifactId>paper-button</artifactId>
   <version>3.0.1</version>
</dependency>

How can i now use this component in PlainJava?

Something like:

Paperbutton pb = new Paperbutton();

Hello hans-georg,

It is not enough with importing the client-side component.
In addition to this, you need to create a server-side component.

Here it is a draft server-side component for the paper-button client-side component.

You can use Vaadin mixins to give functionality to your web component, just by implementing the
interfaces.

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasComponents;
import com.vaadin.flow.component.HasStyle;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.HtmlImport;


@Tag("paper-button")
@HtmlImport("bower_components/paper-button/paper-button.html")
public class PaperButton extends Component implements HasStyle,HasComponents {

}

After this, you can use the component in the Java server-side like this:

PaperButton paperButton = new PaperButton();

paperButton.add(new Icon(VaadinIcon.AIRPLANE), new Text("My icon"));
add(paperButton);

I attached an image that shows how it looks like.

17433509.png

Thanks for your answer.

But i get the following error

Error loading http://localhost:8080/AppFrontend/frontend/bower_components/paper-button/paper-button.html

How can i get the path to find the paper-button.html?

Attached i send you a picture of the file-hierarchie of paper-button

17433869.png