Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JTable, JTableHeader: Right align a header column containing a Number type

843804Jun 13 2005 — edited Jun 14 2005
I am trying to right align only one column header in a JTable. The column contains a Number type, so all the cells below the header are right aligned. The other columns are left aligned. I want the header alignment to match.

Alignment of all the header cells is easy, but how do I change only one of the header cells to match the Number alignment?

I am using the code from here for figuring things out:
http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/TableDemo.java

thanks,

david
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2005
Added on Jun 13 2005
5 comments
539 views