_table.setModel(new DefaultTableModel());
return;
}
String[] columnNames = {"Keyword", "Value", "Comment"};
Header header = hdu.getHeader();
int numKeywords = header.getNumberOfCards();
String[][] values = new String[numKeywords][3];
Iterator it = header.iterator();
int n = 0;
while (it.hasNext()) {
HeaderCard card = (HeaderCard) (it.next());
String name = card.getKey();
String value = card.getValue();
String comment = card.getComment();
values[n][0] = name;
values[n][1] = value;
values[n++][2] = comment;
}
_table.setModel(new DefaultTableModel(values, columnNames));
//table.sizeColumnsToFit(-1); // XXX workaround for Java bugID# 4226181
_sumColWidths = TableUtil.initColumnSizes(_table, null);
resize();
updateTitle(header.getStringValue("EXTNAME"));
}