Quick example to show how to use the QTableWidget:
List<String> headers = ais.get(firstKey).getStatsHeaders();
// adds an extra header
headers.add(0, "Device");
// populate all the header labels
ui.tblStats.setHorizontalHeaderLabels(headers);
// insert a new item
QTableWidgetItem item = new QTableWidgetItem(name);
ui.tblStats.insertRow(0);
ui.tblStats.setItem(0, 0, item);