Using Vaadin-Icons

I am using vaadin 8

How can i use the Vaadin-Icons in my Application.

I install it with maven:

<dependency>
   <groupId>com.vaadin</groupId>
   <artifactId>vaadin-icons</artifactId>
   <version>2.0.0</version>
</dependency>

<repository>
   <id>vaadin-addons</id>
   <url>http://maven.vaadin.com/vaadin-addons</url>
</repository>

Now i want to use it in my Java-Code with:

Icon edit = new Icon(VaadinIcon.EDIT);

But i get the error:

VaadinIcon cannot be resolved to a variable

Have i make an error in using the Icons?

If you’re using Vaadin 8 and the Valo theme, you don’t need to add any dependencies to use Vaadin font icons anymore, since they’re included in the framework itself nowadays.

If you want to create, for instance, a button with an icon, you can just do it like this:

	Button edit = new Button("Edit");
	edit.setIcon(VaadinIcons.EDIT);

The relevant bit in the documentation can be found here: https://vaadin.com/docs/v8/framework/themes/themes-fonticon.html

Hope this helps.

-Markus

Thanks.
Very easy, now it works.