[SOLVED] How do you add cell padding to a JTable?
This is very frustrating, I have been trying to figure out how to add cell padding to all the cells (including the header) in my JTable. I tried setIntercellSpacing but that adds padding to the space between cells. I am looking to add the equivalent of "1 space" of padding to the left and the right side of the inside of the cells so that the text is nicer to read when the text is left or right aligned. Anybody have any ideas on how to accomplish this?
You are some kind of genius!
I would not have guessed
"l.setBorder(new CompoundBorder(new EmptyBorder(new Insets(1,4,1,4)), l.getBorder()));"
on my own.
Thank you, it looks great now!!!!!!