嘿,我只需要回答一个问题......我怎样才能让下面的代码不冻结我的整个 JFrame?
try {
Thread.sleep(Integer.parseInt(delayField.getText()) * 1000);
System.out.println("Hello!");
} catch(InterruptedException ex) {
Thread.currentThread().interrupt();
}