RosettaCodeData/Task/Hello-world-Graphical/Clojure/hello-world-graphical.clj

16 lines
469 B
Clojure
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
(ns experimentation.core
(:import (javax.swing JOptionPane JFrame JTextArea JButton)
2014-01-17 05:32:22 +00:00
(java.awt FlowLayout)))
2013-04-10 21:29:02 -07:00
(JOptionPane/showMessageDialog nil "Goodbye, World!")
(let [button (JButton. "Goodbye, World!")
window (JFrame. "Goodbye, World!")
text (JTextArea. "Goodbye, World!")]
(doto window
(.setLayout (FlowLayout.))
(.add button)
(.add text)
(.pack)
(.setDefaultCloseOperation (JFrame/EXIT_ON_CLOSE))
(.setVisible true)))