Adding border around jtable
I have a jtable inside a gridbaglayout and want to put title border around the table and the table's header. Does anyone know how to do this?
panel.add(table.getTableHeader(), new GridBagConstraints(0,4,3,1,0,0,anchor,fill,new Insets(0,3,0,3),0,0));
panel.add(table, new GridBagConstraints(0,5,3,2,10,0,anchor,fill,new Insets(0,3,0,3),0,0));
table.setBorder(BorderFactory.createTitledBorder("Test Table"));

