[SOLVED] How do you align/justify idividual table column header text?
If I have a JTable with 3 columns where the headers are "ID", "IN STOCK", "QUANTITY" and I want to individually align each header different.
I would like "ID" header to be left aligned, "IN STOCK" header to be center aligned and "QUANTITY" header to be right aligned, how do I do that?
I found the following code:
TableCellRenderer renderer = table().getTableHeader().getDefaultRenderer();
JLabel label = (JLabel)renderer;
but it causes all table column header text to be aligned.
MultiLineHeaderRenderer: symbol not found
is there some package I need to import or something?
Im getting an error that says:
cannot find symbol: