Have you tried Vaadin? It's like writing a Swing application that compiles to the web. Or at least it was when I used it last, about 7 years ago.