在 JTable 中保持单列静态

发布于 2024-09-06 21:32:00 字数 65 浏览 1 评论 0原文

有没有办法在水平滚动鼠标时使嵌入 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独夜无伴 2024-09-13 21:32:00

此 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文