by javajosh · 13y ago · 0 comments
(Haven't we all sort of agreed that the best way to do UI is largely declarative, and then we wire things together with a selector based library? Why go through the pain of having to write code just to describe static UI resources?)
It's more targeted at a specific niche, the far end of the static website -> web application spectrum. So it's not a large audience, but for its target audience it does it exceptionally well.
I've programmed both. Have you?
Let's see if you can tell which of these snippets is GWT and which is Swing (I've renamed JButton to Button to not make it trivially easy for you):
Button b = new Button("Click me", new ClickHandler() {
public void onClick(ClickEvent event) {
//do something
}
});
vs Button b = new Button("Click Me");
b.addActionListener(new ActionListener(){
void actionPerformed(ActionEvent e){
//do something
}
});