Skip to content

Instantly share code, notes, and snippets.

@bakkdoor
Created October 5, 2008 22:51
Show Gist options
  • Save bakkdoor/14950 to your computer and use it in GitHub Desktop.
Save bakkdoor/14950 to your computer and use it in GitHub Desktop.
module RCalc
require "java"
require "rswing"
require "frame"
require "text_field"
include RSwing::Components
include_package 'javax.swing'
include_package 'java.awt'
class MainFrame < Frame
BorderLayout = java::awt::BorderLayout
def initialize (name, &block)
super(name, &block)
self.default_close_operation = :exit_on_close
#frame.layout = BorderLayout.new
self.pack
self.visible = true
end
end
MainFrame.new("rCalc") do |frame|
TextField.new( :belongs_to => frame, :name => :textField, :layout => BorderLayout::NORTH )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment