Created
July 17, 2018 19:47
-
-
Save tlrobinson/84533de28c6eaf27f89cf04c0f616470 to your computer and use it in GitHub Desktop.
java swing in clojure hello world
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
(javax.swing.SwingUtilities/invokeLater (fn [] | |
(let [frame (new javax.swing.JFrame "HelloWorldSwing") | |
label (new javax.swing.JLabel "Hello World")] | |
(.setDefaultCloseOperation frame javax.swing.JFrame/EXIT_ON_CLOSE) | |
(.add (.getContentPane frame) label) | |
(.pack frame) | |
(.setVisible frame true)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment