hi Barry,
u can justify ur aligment of header or data in columns
there r classes avaliable ,kindly read "TableCellRenderer"
make a class which extends JLabel and implements TableCellRenderer
......
jTabel.getTableHeader().setDefaultRenderer(new
MyTableCellRenderer());
.......
class MyTableCellRendererextends JLabel implements TableCellRenderer {
public MyTableCellRenderer() {
super();
setOpaque(true);
}
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int
row,
int column) {
String s = (String) value;
setText(s);
setHorizontalAlignment(RIGHT);
setForeground(table.getForeground());
setBackground(table.getBackground());
return this;
}
}
Hope this will help u out.