为什么表的列名不显示在这里? [英] Why table's column names are not displayed here?

查看:159
本文介绍了为什么表的列名不显示在这里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个翘板表的问题。当我试图弥补和显示一个简单的表,它显示没有列名称。

我做了什么:

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:

首先,我必须说我使用 [seesaw1.4.2]

然后:

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"]]]))



表出现,但没有列名称,我想,必须是一个和另一个。这里发生了什么问题?


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

如果我使用与官方wiki完全相同的代码也会发生: https://github.com/daveray/seesaw/wiki/Tables

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

我忘了提及,我使用的是JDK 1.7u10,也许有意义。

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

推荐答案

我不知道如何使用翘板表。但一般来说,你需要添加JTable到JScrollPane。这是因为JScrollPane使列标题在顶部可用,即使当您滚动数据。如果你不想使用JScrollPane然后u需要手动添加列标题到容器,所以他们保持在顶部。所以尝试添加JScrollPane。

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...:)

这篇关于为什么表的列名不显示在这里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆