Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.wintindustries.pfserver.interfaces.container.components.PFSearch; import com.vaadin.server.FontAwesome; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.TextField; /** * * @author Admin */ public class PFSearchBar extends HorizontalLayout { TextField searchbar; public PFSearchBar() { setWidth("100%"); searchbar = BuildSearchBar(); addComponent(searchbar); } private TextField BuildSearchBar() { searchbar = new TextField(); searchbar.setWidth("100%"); searchbar.setInputPrompt("Search"); searchbar.addStyleName("small"); searchbar.addStyleName("inline-icon"); searchbar.addStyleName("searchbar"); searchbar.setIcon(FontAwesome.SEARCH); return searchbar; } }