You might be able to get away with some hack like putting an Image on an AbsoluteLayout and playing around with z-index and transparency, but it’s probably not going to be nice.
May be I didn’t understand your solution but when I speak about “background” I mean that I will have some other objects (fields and son on) over the image.
I can’t understand how your solution could solve that problem.
Tks
CSS z-index allows you to define the order of an element in the z-axis, so towards and away from the screen. So if you have an Image element on the bottom of the z-stack and other components are higher, those components are on top of the image. See more about AbsoluteLayout in the docs:
https://vaadin.com/docs/-/part/framework/layout/layout-absolutelayout.html
I write in scala, but I suppose it will be easily translated to java:
public class MyPanel(funnyPicture:Boolean) extends Panel{
private val prefix = “https://mysite.com/VAADIN/themes/mytheme/images”
private val funny = “funny.png”
private val boring = “boring.png”