a guest May 16th, 2018 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- open CadmiumObj
- open Swing
- let () =
- let frame = new jFrame (`String "My Frame") in
- let button = new jButton (`String "Press Me!") in
- button#addActionListener (new jActionListener (`Cd'wrap (object
- method actionPerformed (_ : jObject) =
- button#setText "Hello OCaml!"
- ignore (frame#add (button :> jObject));
- frame#setLayout (new jGridLayout (`IntIntIntInt (2l, 2l, 3l, 3l)) :> jObject);
- frame#setSize 300l 80l;
- frame#setVisible true
RAW Paste Data