Display column names in table

89 Views Asked by At

I have created a table "sampletable". I am trying to display the name of the columns. I tried adding the text but it still doesn't show the names.

(def sampletable
  (seesaw/table :model
                [:columns [{:key :name, :text "Name"} :likes]
                 :rows [["Bobby" "Laura Palmer"]
                        ["Agent Cooper" "Cherry Pie"]
                        {:likes "Laura Palmer" :name "James"}
                        {:name "Big Ed" :likes "Norma Jennings"}]]))

Any help would be appreciated.

1

There are 1 best solutions below

1
On

Try this

(require '[seesaw.table])

(def sampletable
  (seesaw/table
   :model (seesaw.table/table-model
           :columns [{:key :name, :text "Name"} :likes]
           :rows [["Bobby" "Laura Palmer"]
                  ["Agent Cooper" "Cherry Pie"]
                  {:likes "Laura Palmer" :name "James"}
                  {:name "Big Ed" :likes "Norma Jennings"}])))