Right align cell values in JTable ?

Discussion in 'Java' started by Ulf Meinhardt, Feb 22, 2005.

  1. 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
    Ulf Meinhardt, Feb 22, 2005
    #1
    1. Advertising

  2. Ulf Meinhardt

    Roland Guest

    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_/ /__/
    / \ /_/ / \
    Roland, Feb 22, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    6
    Views:
    404
    James Thomas
    Jan 5, 2005
  2. Tivo Escobar
    Replies:
    1
    Views:
    7,308
    manusa
    Apr 12, 2007
  3. Replies:
    0
    Views:
    506
  4. tony
    Replies:
    0
    Views:
    630
  5. Bogdan
    Replies:
    1
    Views:
    782
    Bogdan
    Jun 16, 2009
Loading...

Share This Page