Created
September 9, 2012 03:04
-
-
Save alcidesfp/3682350 to your computer and use it in GitHub Desktop.
Podcast Recursivo Ejemplo1: Groovy
This file contains hidden or 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
| // -*- 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