 <p>Try this:</p> <pre><code>searchText.getElement().getStyle().setLineHeight(20, Unit.PX); </code></pre> <p>If you want to do this often (i.e. for many components), you should consider using CSS to style the textfield. This involves:</p> <ol> <li><p>add a stylename to the textfield</p> <p><code>searchText.addStyleName("mytextfield");</code></p></li> <li><p>in your CSS, define the styles for <code>mytextfield</code> class:</p> <p><code>.mytextfield { line-height: 20px }</code></p></li> </ol>