Hi!
I want to create a JFrame using Seesaw which
a) has JPanels on the left, right, top, and bottom, and
b) an image in the center.
Inspired by this example I wrote the following code:
(defn show-main-window
[]
(let [content-pane (border-panel
:north (create-top-panel)
:west (create-left-panel)
:east (create-right-panel)
:south (create-bottom-panel)
:center (create-center-panel)
)
f (frame :title "Title"
:content content-pane)]
(native!)
(-> f pack! show!)))
(defn create-top-panel
[]
(label "create-top-panel"))
(defn create-left-panel
[]
(label "create-left-panel"))
(defn create-center-panel
[]
(let []
(label
:icon (clojure.java.io/resource "/Users/myusername/some-place-on-disk/img/2019_10_20_fireplace.jpg"))))
(defn create-right-panel
[]
(label "create-right-panel"))
(defn create-bottom-panel
[]
(label "create-bottom-panel"))
When I run this function the image is not visible.
How do I need to modify the code in order to display the image?
Thanks in advance
Pravles