From: Niklas Frykholm Date: 2001-08-16T01:57:23+09:00 Subject: [ruby-talk:19802] Re: The GUI poll is in, and the results aresurprising On Thu, Aug 16, 2001 at 01:33:00AM +0900, Hal E. Fulton wrote: > Maybe even a CSS-like system where the user can specify defaults on an > app-wide basis. Doesn't Swing do something like that? Yes, a component inherits the properties of its parent component unless they are specified explicitly. > Yes... and if we had a JVM-based Ruby... couldn't we use Swing? Or am > I over-simplifying? Swing is an OK toolkit, but suffers badly from Java's limitations. Since Java lacks first-class functions you are forced to write dozens of one-method classes. In ruby I would write button.add_action_listener {|e| cancel} but in Java I have to write button.addActionListener (new ActionListener() { public void actionPerformed(ActionEvent e) { cancel(); } } ); Horrible. // Niklas