Skip to content

Instantly share code, notes, and snippets.

Created August 7, 2010 04:31
Show Gist options
  • Select an option

  • Save anonymous/512430 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/512430 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
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