This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes right justify text in a JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "right justify text in a JTable" Watch "right justify text in a JTable" New topic
Author

right justify text in a JTable

jeff willis
Greenhorn

Joined: Jul 29, 2004
Posts: 25
Is it possible to right justify text in a JTable?

I've tried using Strings, JLabel, and even extending DefaultTableCellRenderer but all I ever get is left justified text.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
jeff willis
Greenhorn

Joined: Jul 29, 2004
Posts: 25
thanks. Your response is very impressive. Complete, to-the-point, and "cut-and-pastable"!

It's exactly what I needed.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: right justify text in a JTable
 
Similar Threads
Formatting JTable columns
JTable Editing
jtable
JTable tabbing
Formatting JTable columns