I am trying to create a JTable where certain columns are right-justified. I found some code that seemed to make sense, but I can't get it to work.
Here is what I am doing:
And here's my code for the AdjRateModel:
What am I doing wrong?
I also have another question on custom JTables.
I have a table that has a custom model that populates the table with values for different departments. When there are no more records for that dept, a subtotal line is printed. My question is, how do I get these subtotal lines to be a different color, or font? I looked at an example of a custom cell renderer, but I don't understand how I can tell it to make that certain line a different color. I can't tell it a row number because the subtotal lines will not always be the same row number.
How can I accomplish this?
I would really appreciate any help anyone could give me.
I'm having a hard time with these darn tables!
Thanks!