I am using this code:
Border border = BorderFactory.createLineBorder(Color.green);
DefaulTableModel dtm= new DefaultTableModel();
dtm.addColumn("Srno.");
dtm.addColumn("Product");
JTable table = new JTable(dtm);
table.getTableHeader().setBackground(new Color(150,255,150));
JTableHeader hed = table.getTableHeader();
hed.setBorder(border);
I want to add border for each cell of the tableheader
. Is there any method to do this?