int height = ids[p].getStructureState(s).getHeight();
java.awt.Component comp = null;
-
- JInternalFrame[] frames = Desktop.desktop.getAllFrames();
+
+ JInternalFrame[] frames = null;
+ do {
+ try {
+ frames = Desktop.desktop.getAllFrames();
+ }
+ catch (ArrayIndexOutOfBoundsException e)
+ {
+ // occasional No such child exceptions are thrown here...
+ frames = null;
+ try {
+ Thread.sleep(10);
+ } catch (Exception f) {};
+ }
+ } while (frames==null);
for (int f = 0; f < frames.length; f++)
{
if (frames[f] instanceof AppJmol)