I have this Runnable window:
EventQueue.invokeLater(new Runnable(){
@Override
public void run() {
op = new JOptionPane("Breaktime",JOptionPane.WARNING_MESSAGE);
dialog = op.createDialog("Break");
dialog.setAlwaysOnTop(true);
dialog.setModal(true);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
}
});
Is it possible that I can have a timer here to close this within 1 or 2 minutes instead of clicking the OK button?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…