I'm trying to obtain square ( cells with the same width and height ) However I can only resize the width with the method setPreferredWidth like this:
TableColumnModel tcm = table1.getColumnModel();
tcm.getColumn(0).setPreferredWidth(100);
I tried to use the method setPreferredSize(100,100);
but it doesn't work and I tried the method setRowHeight(100);
but it still does not work... I'm using an internal frame, I don't know if it is the reason setRowHeight doesn't work.
How can I do?