how to place an image inside Textfield

Hi all
I have to place an image inside textfield . As it is there in this vaadin - > Discuss page search box

mycode looks like this
TextField search= new TextField();
search.setInputPrompt(“search”);

setIcon method doesn’t place the image inside textfield . Can anyone let me know how to achieve this.

Thanks a lot

You can set a background image for the TextField with CSS in a theme. If you don’t want the image to overlap with the text, just adjust the margins/padding.