开发者

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:

JTable rows are rendering way to small 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜