Hello all,
I have a question regarding showing an image and on top of the image a label. I have tested a lot of things but it does not work. Is it possible to define a specific position (maybe with a transparent background?).
GridLayout layout = new GridLayout(1, 1);
super.setCompositionRoot(layout);
HorizontalLayout imageLayout = new HorizontalLayout();
String basepath = VaadinService.getCurrent().getBaseDirectory().getAbsolutePath();
FileResource resource = new FileResource(new File(basepath + "\\test.jpg"));
Image image = new Image();
image.setWidth("100%");
image.setSource(resource);
imageLayout.setSizeFull();
imageLayout.addComponent(image);
layout.addComponent(imageLayout, 0, 0);
Label label = new Label("Text on top of a component");
layout.addComponent(label, 0, 0);
Best Regards,
Thomas