Skip to content

Instantly share code, notes, and snippets.

Created August 7, 2010 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/512443 to your computer and use it in GitHub Desktop.
Save anonymous/512443 to your computer and use it in GitHub Desktop.
#!/usr/bin/env jruby
# main.rb
require 'java'
include_class java.awt.Component
include_class javax.swing.JOptionPane
include_class javax.swing.SwingUtilities
include_class 'SampleFrame'
class Main
def main(args= nil)
sample_frame = SampleFrame.new
sample_frame.set_visible(true)
end
def inform(parent, str)
if SwingUtilities.isEventDispatchThread()
showMsg( parent, str, JOptionPane.INFORMATION_MESSAGE)
else
# do nothing yet
end
end
end
Main.new().main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment