DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links