Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created November 30, 2008 19:38
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 jashkenas/30510 to your computer and use it in GitHub Desktop.
Save jashkenas/30510 to your computer and use it in GitHub Desktop.
def display_in_an_applet
JRUBY_APPLET.setSize(@width, @height)
JRUBY_APPLET.background_color = nil
JRUBY_APPLET.double_buffered = false
JRUBY_APPLET.add self
JRUBY_APPLET.validate
# Add the callbacks to peacefully expire.
JRUBY_APPLET.on_stop { self.stop }
JRUBY_APPLET.on_destroy { self.destroy }
self.init
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment