Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def top-frame
- (doto (Frame.)
- (.addWindowListener
- (proxy [WindowAdapter] []
- (windowClosing [e] (.dispose top-frame))))
- (.add (doto @(def top-panel (Panel.))
- (.setLayout (BorderLayout. 5 5))
- (.add "North" (doto @(def choice (Choice.))
- (.add "None")
- (.addItemListener
- (reify ItemListener
- (itemStateChanged [_ e]
- (send timers change-timer (.getItem e))
- (.validate top-panel))))))
- (.add "Center" (doto @(def timer-panel (Panel.))
- (.setLayout (GridLayout. 0 2))))
- (.add "South" (doto (Panel.)
- (.setLayout (GridLayout. 0 2))
- (.add (doto (Button. "Add")
- (.addActionListener
- (reify ActionListener
- (actionPerformed [_ _]
- (add-timer (.getText add-name)))))))
- (.add @(def add-name (TextField.)))))))
- (.pack)
- (.setVisible true)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement