JTable rows are rendering way to small
For some reason, all of my JTable rows are extra small?
This code:
DefaultTableModel tableModel = new DefaultTableModel(sheetRowHeight, sheetMaxCellLength);
int rCount=0;
int cCount=0;
for (ArrayList a:tableData)
{
for(Object o:a)
{
String s =(String)o;
tableModel.setValueAt(s, rCount, cCount);
开发者_开发知识库 cCount++;
System.out.println(s);
}
cCount=0;
rCount++;
}
//all data should now be in tablemodel
System.out.println("setting model");
tableView.setModel(tableModel);
Gives me this:
Any ideas on what the hell is happening here? Thanks.
EDIT: The issue was that netbeans was autogenerating some code that called tableView.setRowHeight() and that was messing things up.
精彩评论