lib/swing/j_frame.rb in swing-0.1.5 vs lib/swing/j_frame.rb in swing-0.1.7

- old
+ new

@@ -3,27 +3,15 @@ class Swing::JFrame attr_setter :layout, :background, :size, :title, :default_close_operation => EXIT_ON_CLOSE #DISPOSE_ON_CLOSE, HIDE_ON_CLOSE -# def attributes -# a = super -# a.delete :tool_tip_text -# a -# end - def initialize *args - p args super *args - setup + # Yielding self to set up contents before making frame visible + yield self if block_given? self.location_relative_to = nil self.visible = true end - - # Method that subclasses should override to set up their contents before - # JFrame is made visible - def setup - end - end