Sha256: cdbc14b206d553977955d403fd94e2c31b171e0167dbcca2d7813fcfea23db52
Contents?: true
Size: 408 Bytes
Versions: 2
Compression:
Stored size: 408 Bytes
Contents
import javax.swing.JFrame import javax.swing.JButton # FIXME blocks need to be inside a MethodDefinition, but main doesn't # have one. def self.run frame = JFrame.new "Welcome to Duby" frame.setSize 300, 300 frame.setVisible true button = JButton.new "Press me" frame.add button frame.show button.addActionListener do |event| JButton(event.getSource).setText "Duby Rocks!" end end run
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
mirah-0.0.4-java | examples/swing.mirah |
duby-0.0.3-java | examples/swing.duby |