Results 1 to 3 of 3
  1. #1
    shomid is offline Member
    Join Date
    Aug 2011
    Posts
    20
    Rep Power
    0

    Question Align Row to Right in JTable

    How to align a row to the right side in a JTable?
    In this picture, the rows are aligned to left, how can I align the rows to the right side?

    Align Row to Right in JTable-qp4ow.jpg

  2. #2
    bigjo is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default Re: Align Row to Right in JTable

    you have to use a TableCellRenderer

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Align Row to Right in JTable

    Quote Originally Posted by bigjo View Post
    you have to use a TableCellRenderer
    Wrong.

    See the API for setComponentOrientation(...)

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. JLabel won't left-align
    By gib65 in forum AWT / Swing
    Replies: 6
    Last Post: 07-30-2010, 04:07 PM
  2. Align left
    By britto_bicsjohn in forum AWT / Swing
    Replies: 2
    Last Post: 09-09-2009, 04:05 AM
  3. How to align the output on console?
    By sfe23 in forum New To Java
    Replies: 5
    Last Post: 03-30-2009, 03:28 AM
  4. Right Align columns in JTable
    By Laura Warren in forum New To Java
    Replies: 2
    Last Post: 12-18-2008, 09:01 PM
  5. JTextArea - text align
    By bradder in forum AWT / Swing
    Replies: 1
    Last Post: 11-29-2007, 07:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •