private void waitForLoadedChannels() {
final Thread t = ChannelList.getChannelLoadThread();
if (t != null && t.isAlive()) {
Window parent = UiUtilities.getLastModalChildOf(MainFrame.getInstance());
final SettingsWaitingDialog dialog = new SettingsWaitingDialog(parent);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if (t.isAlive()) {
UiUtilities.centerAndShow(dialog);
}
}
});
try {
t.join(10000);
} catch (Exception e) {
e.printStackTrace();
}
dialog.setVisible(false);
dialog.dispose();
}
}