X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fuimodel%2FPDBRestResponse.java;h=3471fab0ae4e8e233df672a38c21630b82b6ac4d;hb=39a3725d4d499eb0f1bd14e3c049cd954faddfdc;hp=2a38b39949a0e282c854405ac5ddffb88054fe83;hpb=f8563f9a829936e3cf75f36282e4816a3ea6163b;p=jalview.git diff --git a/src/jalview/ws/uimodel/PDBRestResponse.java b/src/jalview/ws/uimodel/PDBRestResponse.java index 2a38b39..3471fab 100644 --- a/src/jalview/ws/uimodel/PDBRestResponse.java +++ b/src/jalview/ws/uimodel/PDBRestResponse.java @@ -198,7 +198,8 @@ public class PDBRestResponse summaryRowData[colCounter++] = 0.0; } }else{ - summaryRowData[colCounter++] = fieldData; + summaryRowData[colCounter++] = (fieldData == null || fieldData + .isEmpty()) ? null : fieldData; } } } @@ -268,8 +269,18 @@ public class PDBRestResponse public static void configureTableColumn(JTable tbl_summary, Collection wantedFields) { + try + { + // wait for table model initialisation to complete + Thread.sleep(1200); + } catch (InterruptedException e1) + { + e1.printStackTrace(); + } for (PDBDocField wantedField : wantedFields) { + try + { if (wantedField.equals(PDBDocField.PDB_ID)) { tbl_summary.getColumn(wantedField.getName()).setMinWidth(40); @@ -294,6 +305,10 @@ public class PDBRestResponse tbl_summary.getColumn(wantedField.getName()).setMaxWidth(400); tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(95); } + } catch (Exception e) + { + e.printStackTrace(); + } } } }