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?
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.
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.
Have you played around with those to see if they help?
That's just for columns though and not row height.
How did I miss this in the JTable? setRowHeight()
argh, i need a break
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center