Swing jtable-如何设置列之间的间距

Swing jtable-如何设置列之间的间距,swing,jtable,Swing,Jtable,有没有办法在JTable列或行之间添加间隙? (不使用单元渲染器)查看setIntercellSpacing和/或setRow/ColumnMargin。好的,查一下方法: // set gap between rows, api in JTable table.setRowMargin(int) // set gap between columns, api in TableColumnModel table.getColumnModel().setColumnMargin(int) // c

有没有办法在JTable列或行之间添加间隙?
(不使用单元渲染器)

查看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) 

为了讨论这个论坛的可用性/标准,这里有一个元论坛:-)也请看这个。嗨,这把空白放在了单元格内。我想把柱子拆开一点。有没有办法将间隙放在单元格外部?没有,没有-你可以通过f.i.选择一行来验证:选择颜色是“内部”,也就是渲染组件渲染的部分,中间的区域是表格本身渲染的部分(背景色)。你还想实现什么?