HI All,
In my Swing application i'm using a few cell renderers for JTable. I'm
using an image with rounded corners, shadows and all to give the cell a
very good look. But if the cell is not exactly same dimension as that
of the image, the image is getting truncated. Is there any way to make
the image shrink and grow a required by the size of the cell. Please
advice
Thanks in advance
Chanchal
Liz - 27 Apr 2006 22:26 GMT
You need to create your own cellrenderer to do this.
Get the dimension of the cell using the method
Rectangle getCellRect(int row,
int column,
boolean includeSpacing)
Then scale the image to the size of the cell, then update the
cellrenderer with this scaled image
-------------------------------
QuickTable - A free javabean grid control using Jtable which hides all
the complexities of JTable
http://quicktable.org