This commit is contained in:
huangyuhui
2016-02-18 20:00:03 +08:00
parent 48f14e193a
commit dd0cdb5c83
10 changed files with 59 additions and 14 deletions

View File

@@ -17,6 +17,7 @@
*/
package org.jackhuang.hellominecraft.util.ui;
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.FontMetrics;
import java.io.File;
@@ -27,6 +28,7 @@ import java.util.HashMap;
import java.util.Map;
import javax.swing.DefaultListModel;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
@@ -265,4 +267,13 @@ public class SwingUtils {
return -1;
return ((JComboBox) msgs[1]).getSelectedIndex();
}
public static void setEnabled(JComponent component, boolean t) {
synchronized (component.getTreeLock()) {
for (Component c : component.getComponents())
if (c instanceof JComponent)
setEnabled((JComponent) c, t);
}
component.setEnabled(t);
}
}

View File

@@ -460,6 +460,7 @@ public class WizardDisplayerImpl extends WizardDisplayer {
}
};
Thread runner = new Thread(run, "Wizard Background Result Thread " + r);
runner.setDaemon(true);
runner.start();
}