You can use these methods in JTable to remove the grid if your column models are not generated automatically (without data binding).
setShowGrid(false); setRowMargin(0); setShowVerticalLines(false); setShowHorizontalLines(false);
But if you created column models using data binding, then you will have problems. This is even if you call these methods, they still color the white space at 1 pixel in each column field.
You can remove this column marker using the user defaultTableColumnModel method.
private class CustomDefaultTableColumnModel extends DefaultTableColumnModel{ @Override public void setColumnMargin(int newMargin) {
Then you can add your column table to the table.
setColumnModel(new CustomDefaultTableColumnModel());
source share