3 ms·
Programming with GWT is nothing like swing. Nothing.
by badgar 14y ago
Programming with GWT is nothing like swing. Nothing.
- javajosh 14y agoOh really. 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 } });
- badgar 14y agoThe first is unidiomatic GWT, the latter is swing. I can count the times I've set up a button with a click handler without UIBinder on one hand. So I'll assume based on your post that you always instantiated buttons that way since you never learned how to use GWT beyond how to run the compiler.