Hey there, I have written the following code:
`package com.example.vaadin_chart2;
import com.vaadin.annotations.StyleSheet;
import com.vaadin.server.VaadinRequest;
import com.vaadin.spring.annotation.SpringUI;
import com.vaadin.ui.*;
@StyleSheet(“style.css”)
@SpringUI
public class ChartUI extends UI {
CssLayout layout;
@Override
protected void init(VaadinRequest vaadinRequest) {
setupLayout();
}
private void setupLayout() {
layout= new CssLayout();
setContent(layout);
Label l = new Label();
l.addStyleName("Head");
layout.addComponent(l);
Button button = new Button("button");
layout.addComponent(button);
}
}
`
I tried to include the css via the annotation, but i doesn’t work out (no black square). Somewhere I have read i should overwrite the css in the Vaadin directory, but i have no such directory in my source path. I have downloaded the project folder and dependencies from start.spring.io .
Here is the css, which is in the same directory as the java class :
.v-label-Head{
width: 20px;
height: 20px;
color: black;
}
Greetings Julian