From my perspective, JS is more more enjoyable to use when writing UIs. Java's strictness is not nearly as useful for UI work than it might be for other domains, and Javascript's first-class functions greatly simplify event-based work (which is much of what happens in a UI). Also, JSON is painless to use in JS, while Java will again get bogged down in its type system -- if you use JSON as a transport format then yet another plus for JS. Java is great for the server, but I would never want to write a UI using it.
Comments
From my perspective, JS is more more enjoyable to use when writing UIs. Java's strictness is not nearly as useful for UI work than it might be for other domains, and Javascript's first-class functions greatly simplify event-based work (which is much of what happens in a UI). Also, JSON is painless to use in JS, while Java will again get bogged down in its type system -- if you use JSON as a transport format then yet another plus for JS. Java is great for the server, but I would never want to write a UI using it.