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!"
- end)));
- ignore (frame#add (button :> jObject));
- frame#setLayout (new jGridLayout (`IntIntIntInt (2l, 2l, 3l, 3l)) :> jObject);
- frame#setSize 300l 80l;
- frame#setVisible true
Add Comment
Please, Sign In to add comment