Errr well you can… but you probably shouldn’t. I renders out to some awful HTML/CSS/JS, but it’s pretty widely used.
Google Web Toolkit (GWT)
There is also Vaadin and Wicket.