set cell size in jtable


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: set cell size in jtable

  1. #1
    Join Date
    Mar 2004
    Posts
    635

    set cell size in jtable

    i just can't think at the moment. How can I set the size so that each cell is square?

  2. #2
    Join Date
    Sep 2004
    Posts
    150
    make the width = height?

  3. #3
    Join Date
    Mar 2004
    Posts
    635
    yes but how do I set those properties automatically. I thought maybe the cell would resize if I put an image in it, but it just clips the image.

  4. #4
    Join Date
    Sep 2004
    Posts
    150
    Here are some of the options from the Jtable docs:

    static int AUTO_RESIZE_ALL_COLUMNS
    During all resize operations, proportionately resize all columns.
    static int AUTO_RESIZE_LAST_COLUMN
    During all resize operations, apply adjustments to the last column only.
    static int AUTO_RESIZE_NEXT_COLUMN
    When a column is adjusted in the UI, adjust the next column the opposite way.
    static int AUTO_RESIZE_OFF
    Do not adjust column widths automatically; use a scrollbar.
    static int AUTO_RESIZE_SUBSEQUENT_COLUMNS
    During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.

    (shrug).

    Have you played around with those to see if they help?

  5. #5
    Join Date
    Mar 2004
    Posts
    635
    That's just for columns though and not row height.

    How did I miss this in the JTable? setRowHeight()
    argh, i need a break

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center