HostDescriptionDialog hostDescriptionDialog = new HostDescriptionDialog(engine.getConfiguration().getAiravataAPI(), null);
hostDescriptionDialog.setLocationRelativeTo(getContentPane());
hostDescriptionDialog.open();
if (hostDescriptionDialog.isHostCreated()) {
ProgressMonitor progressMonitor = new ProgressMonitor(getContentPane(), "Host Descriptions", "Refreshing host list..", 0, 200);
int progress=1;
progressMonitor.setProgress(progress++);
while(cmbHostName.getSelectedIndex()==-1 || !cmbHostName.getSelectedItem().toString().equals(hostDescriptionDialog.getHostLocation())){
loadHostDescriptions();
cmbHostName.setSelectedItem(hostDescriptionDialog.getHostLocation());
progressMonitor.setProgress(progress++);
Thread.sleep(50);
}
progressMonitor.setProgress(200);
}
} catch (Exception e1) {
e1.printStackTrace();
JOptionPane.showMessageDialog(null, e1.getLocalizedMessage());
}