有没有办法在JTable列或行之间添加间隙? (不使用单元格渲染器)
答案 0 :(得分:11)
查看setIntercellSpacing和/或setRow / ColumnMargin。好的,查看方法:
// set gap between rows, api in JTable
table.setRowMargin(int)
// set gap between columns, api in TableColumnModel
table.getColumnModel().setColumnMargin(int)
// convenience for setting both row and column gaps
table.setIntercellSpacing(Dimension)