Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为tblMainData的表,其中有几列,其中几列的宽度为0。
我想将除宽度为0的列之外的所有数据存储到二维数组中。
如何检查特定列的宽度是否为0 ?
只需致电TableColumn#getWidth():
TableColumn#getWidth()
for(int col = 0; col < tblMainData.getColumnCount(); col++) { if(tblMainData.getColumn(col).getWidth() == 0) { // do something } }