简体   繁体   English

表格栏未显示

[英]Table columns aren't appearing

Simple as the title says. 正如标题所说的那样简单。 They just won't appear. 他们只是不会出现。 I don't know why. 我不知道为什么 BTW, The table is added on a panel that has setLayout(null); 顺便说一句,该表被添加到具有setLayout(null);的面板上setLayout(null); So, I don't know if that affects it. 所以,我不知道这是否会影响它。 I just really don't know where the problem is coming from. 我只是真的不知道问题出在哪里。 I'm completely clueless. 我完全一无所知。

DELETED 已删除

Change DisplayTab.add(table); 更改DisplayTab.add(table); to DisplayTab.add(scrollPane); DisplayTab.add(scrollPane); and make use of appropriate layouts 并使用适当的布局

Avoid using null layouts, pixel perfect layouts are an illusion within modern ui design. 避免使用null布局,像素完美布局是现代ui设计中的一种幻觉。 There are too many factors which affect the individual size of components, none of which you can control. 有太多因素会影响组件的单个大小,您无法控制。 Swing was designed to work with layout managers at the core, discarding these will lead to no end of issues and problems that you will spend more and more time trying to rectify Swing旨在与布局经理为核心一起工作,舍弃这些问题不会导致问题和问题的终结,您将花费越来越多的时间来尝试纠正

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM