|
[jruby-user] ActionListener cannot be subclassed: msg#00132lang.jruby.user
Hi all, I am trying one of the various jRuby/swing examples out there. But I allways get a type error when I subclass ActionListener: require ‘java‘ include_class ‘java.awt.event.ActionListener‘ include_class ‘javax.swing.JButton‘ include_class ‘javax.swing.JFrame‘ class ClickAction < ActionListener # exception here!!! def actionPerformed(event) puts “Button got clicked.“ end end class MainWindow < JFrame def initialize super “JRuby/Swing Demo“ setDefaultCloseOperation JFrame::EXIT_ON_CLOSE button = JButton.new “Click me!“ button.addActionListener ClickAction.new add button pack end end MainWindow.new.setVisible true Any hints? Thx Clemens -- View this message in context: http://www.nabble.com/ActionListener-cannot-be-subclassed-tf4810366.html#a13763302 Sent from the JRuby - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [jruby-user] Netbeans Run Single File: 00132, Mike McKinney |
|---|---|
| Next by Date: | Re: [jruby-user] ActionListener cannot be subclassed: 00132, Takayuki Okazaki |
| Previous by Thread: | [jruby-user] Netbeans Run Single Filei: 00132, paulfras |
| Next by Thread: | Re: [jruby-user] ActionListener cannot be subclassed: 00132, Takayuki Okazaki |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |