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
(ns tetris | |
(:import | |
(javax.swing JFrame) | |
(java.awt Canvas Graphics Color Toolkit) | |
(java.awt.event ActionListener KeyListener KeyEvent)) | |
(:gen-class)) | |
(def *cols* 10) | |
(def *rows* 20) | |
(def *width* 300) |
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
(def x (ref 0) | |
(def agents (for [i (range 0 1000)] (agent x))) | |
(map #(send %1 (fn [x] (dosync (alter x inc)))) agents) |
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
(ns swinger | |
(:import (java.awt BorderLayout Container Dimension)) | |
(:import (javax.swing JButton JFrame JLabel JPanel JTextField JOptionPane JScrollPane JList ImageIcon JComboBox JSeparator JTable UIManager SwingUtilities AbstractButton JFileChooser JDialog JProgressBar JTabbedPane)) | |
(:import (javax.swing.table AbstractTableModel)) | |
(:import (java.awt.event MouseAdapter MouseListener KeyEvent)) | |
(:import (java.awt Toolkit BorderLayout Dimension Color Dialog$ModalityType)) | |
(:use (clojure.contrib | |
[miglayout :only (miglayout components)] | |
[swing-utils :only (add-action-listener add-key-typed-listener make-menubar)]))) |
NewerOlder