表列的文本和值不完整可见?

时间:2019-02-06 07:38:13

标签: java swing jtable

我有一个JTable,并且从DB获取了值,但是以适当的方式看不到Table列名和值。 请指导我.. !!

        ArrayList<QueueLogList> qLogList = dispList();

        DefaultTableModel model = (DefaultTableModel)qTableList.getModel();
        qTableList.setModel(model);

        model.getDataVector().removeAllElements();
        Object []row = new Object[13];
        for(QueueLogList queueLogList:qLogList){
          row[0] =  queueLogList.getQueue_no();
          row[1] =  queueLogList.getPcno();
          row[2] =  queueLogList.getPname();
          row[3] =  queueLogList.getGender();
          row[4] =  queueLogList.getAge();
          row[5] =  queueLogList.getDr_id();
          row[6] =  queueLogList.getDate();
          row[7] =  queueLogList.getTime_in();
          row[8] =  queueLogList.getTime_out();
          row[9] =  queueLogList.getAllergy();
          row[10] =  queueLogList.getWeight();
          row[11] =  queueLogList.getHeight();
          row[12] =  queueLogList.getSmoke();

          model.addRow(row);
        }

enter image description here

0 个答案:

没有答案