How do I get screen size in Clojure?
I'm having trouble using Java interop. A demonstration of
Toolkit.getScreenSize()
would be most useful to me.
I've tried
(.getScreenSize Toolkit)
after importing the appropriate library and similar stuff but to no avail.
The problem is that I was trying variations of:
(.getScreenSize Toolkit)
and
(.getScreenSize (.getDefaultToolkit Toolkit))
It has to be:
(.getScreenSize (Toolkit/getDefaultToolkit))
Also for stackers that have no clue you need:
(import java.awt.Toolkit)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.