在JTable中保持单列静态 [英] Keeping a single column static inside a JTable

查看:53
本文介绍了在JTable中保持单列静态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在水平滚动鼠标时是否可以使嵌入在JScrollPane中的JTable的第一列保持静态.该表包含50多个列.

Is there a way to keep the first column of a JTable embedded inside a JScrollPane static on scrolling the mouse horizontally.The table contains more than 50 columns.

推荐答案

此Swing示例网站.作者创建了两个表,并将其中一个放在滚动窗格中.它们都共享相同的模型.然后,他将他们的选择逻辑联系在一起.完整代码可在页面上找到.

There is an example of this on this Swing examples site. The author creates two tables, putting one of them in the scrollpane. They both share the same model. He then ties their selection logic together. The full code is available on the page.

这篇关于在JTable中保持单列静态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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