Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why table's column names are not displayed here?

I have a problem with seesaw table. When I try to make up and show a simple table, it shows without column names.
What I did:

At first, I must say that I am using [seesaw "1.4.2"].
Then:

;; Clojure 1.4.0
(require '[seesaw.core :as ss])

(ss/native!)

(def main-window
     (-> (ss/frame
           :title "Main window")
       ss/pack!
       (ss/config! :minimum-size [320 :by 240])
       ss/show!))

(def display
     #(ss/config! main-window
                  :content %))

(display
     (ss/table
       :id :dumb-table
       :model [:columns
               [:one :another]
               :rows
               [["1" "2"]
                ["3" "4"]]]))

what I get
(source: leprosorium.com)

Table appears, but without column names, which, I guess, must be "one" and "another". What went wrong here?

It happens also if I use exactly the same code as in official wiki: https://github.com/daveray/seesaw/wiki/Tables

Update:

I forgot to mention, I'm using JDK 1.7u10, maybe it makes sense.

like image 508
Display Name Avatar asked Nov 13 '22 14:11

Display Name


1 Answers

I dont know how to use seesaw table. but in general you need to add JTable to JScrollPane. This is because JScrollPane makes column header available at the top even when you scroll the data. if you dont want to use JScrollPane then u need to add the column header manually to the container so they stay at the top. So try adding JScrollPane.

Let me know if i went wrong...:)

like image 77
cJ_ Avatar answered Nov 15 '22 05:11

cJ_