What sort of client side state do you wish to maintain ? AFAIK, one is no longer bound to using Java for feature rich browser based applications. Javascript (in the macro sense that also includes jQuery, YUI, all of google's js stuff and the tons of ajax libraries that litter the web) is quite capable of turning the browser into a proper target platform for alternatives to most desktop based applications.
Javascript is not an optimal solution in this use case.
Based on initial email of this thread, aim it to control a robot from browser based UI. This requires very low-latency communication between UI and device.
Request/Response model of JS is not suitable for this. Socket connections via Flex/ Flash would be tool of choice in current environment. Flex is open source and you can use open source flash player for UI. Flash integrated nicely with browser via JS interface.
Or you can use Flash/Flex just for communication and implement rest of UI in JS.
Same functionality can be achieved via Java Applets, but UI development is not a strength of Java (Swing).
-Shamit