Skip to content

Instantly share code, notes, and snippets.

@alcidesfp
Created September 9, 2012 03:04
Show Gist options
  • Save alcidesfp/3682350 to your computer and use it in GitHub Desktop.
Save alcidesfp/3682350 to your computer and use it in GitHub Desktop.
Podcast Recursivo Ejemplo1: Groovy
// -*- coding:utf-8; mode: Groovy -*-
import javax.swing.JFrame
import java.lang.Runnable
import java.awt.EventQueue
class MyApp implements Runnable {
// members
JFrame main_window
// methods
public MyApp() { //constructor
main_window = new JFrame("Titulo Ventana")
}
void run() { // interfaz Runnable
main_window.size=[300,300]
main_window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
main_window.setVisible(true)
}
static void main(args){
MyApp app1 = new MyApp()
EventQueue.invokeLater(app1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment