Why don't table column names appear here?

I have a problem with a swing table. When I try to compose and show a simple table, it shows without column names.
What I've done:

First I have to 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 http://img.leprosorium.com/1663368
A table will appear, but without the column names, which I think should be "one" and "another." What is wrong here?

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

Update:

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

+4
source share
2 answers

I do not know how to use the swing table. but overall you need to add JTable to JScrollPane. This is because JScrollPane makes the column heading available at the top, even when scrolling through the data. if you do not want to use JScrollPane, you need to add the column heading manually to the container so that they remain at the top. So try adding JScrollPane.

Let me know if I made a mistake ... :)

+1
source

Well, I think you missed something (see link )

 (display (ss/table :id :dumb-table :model [:columns [{:key :one, :text "One~1"} {:key :one, :text "The Other~2"}] :rows [["1" "2"] ["3" "4"]]])) 
-1
source

All Articles