Java Notes

In Clojure, you can call and execute Java code (and you'll have to for things like creating a Swing-based GUI). This is the place to put useful information about Java.


  • Creating a Font object (in order to specify the appearance of a run of text) can be as simple as this:
(Font. "Monospaced", Font/PLAIN, 14)
  • Getting the font object of an existing PText object:
(.. toString getFont myPTextObject)
  • Creating a new font object identical to the old font object, but with a different size:
(.deriveFont oldFontObject (float 18))
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License