Created
August 7, 2010 04:45
-
-
Save anonymous/512443 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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