wl

Unnamed repository; edit this file 'description' to name the repository.
git clone https://logand.com/git/wl.git/
Log | Files | Refs | LICENSE

swing7.l (408B)


      1 # http://stackoverflow.com/questions/233171/what-is-the-best-way-to-do-gui-in-clojure/1505404#1505404
      2 
      3 (load "swing.l")
      4 
      5 (setq F (jnew JFrame "Hello Swing")
      6       D (jnew DefaultTableModel)
      7       A (jnew JTable D)
      8       S (jnew JScrollPane A) )
      9 
     10 (D 'setNumRows 30)
     11 (D 'setColumnCount 5)
     12 ((F 'getContentPane) 'add S)
     13 (F 'setDefaultCloseOperation (jfield JFrame 'EXIT_ON_CLOSE))
     14 (F 'pack)
     15 (F 'setVisible true)