JFileChooser を閉じようとしています。次のスニペットの cancelSelection メソッドが 5 秒後に消えない理由を教えてください。
public static void main(String [] args){
JFrame frame = new JFrame();
frame.setVisible(true);
final JFileChooser fchooser = new JFileChooser();
fchooser.showOpenDialog(frame);
try {Thread.sleep(5000);} catch (Exception e){}
fchooser.cancelSelection();
}
どんな助けでも大歓迎です。