여기에이 작은 코드가 있습니다.Clojure : Java GUI 문제
(ns experiments
(:import (javax.swing JFrame JLabel)))
(defn create-frame [title text]
(doto (JFrame. title)
(.add (JLabel. text))
(.pack)
(.setDefaultCloseOperation JFrame/EXIT_ON_CLOSE)
(.setVisible true)))
지금 나는 REPL을 실행 올바른 클래스 패스로 시작, (Clojure의 박스는 기본적으로 + 점액 이맥스) 등, 호출 (사용 '실험) - 작품 - 그리고는 전화
(create-frame "Foo" "Bar")
.
다음 ... 아무 것도. REPL은 영원히 멈추고 프레임이 나타나지 않고 아무 것도 나타나지 않습니다.
나는 잘못 입력했음을 눈치 채 셨습니다. import as import. 나는 그것을 내 사본에 가지고있다. – Narvius