For Programmers: Free Programming Magazines  


Home > Archive > Java Help > February 2005 > Right align cell values in JTable ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Right align cell values in JTable ?
Ulf Meinhardt

2005-02-22, 9:00 pm

I would like to right align all values (not the headers) of column num 7 in a JTable.
Do I really need to install a DefaultTableCellRenderer?
I could imagine that there is a more easier solution similar to:

myJTable.getColumnNum(7).setRightAligned()

Ulf

Roland

2005-02-22, 9:00 pm

On 22-2-2005 21:25, Ulf Meinhardt wrote:

> I would like to right align all values (not the headers) of column num 7 in a JTable.
> Do I really need to install a DefaultTableCellRenderer?
> I could imagine that there is a more easier solution similar to:
>
> myJTable.getColumnNum(7).setRightAligned()
>
> Ulf
>

[Follow Up removed, original newsgroups reinstated]

Answer in c.l.j.beans

[Posting this to original newsgroups, to signal that at least one reply
has been sent; just to prevent the same situation with 20+ replies to
"How to list (from command line) all files in a "jar" archive ?" in
c.l.j.help]
--
Regards,

Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com