o classe já pronto do java não tem como fazer isso…
vc pode criar manualmente…
/* * To change this template, choose Tools | Templates * and open the template in the editor. *//** * * @author Damiao */importjavax.swing.JOptionPane;importjavax.swing.JDialog;importjavax.swing.Timer;importjava.awt.event.ActionListener;importjava.awt.event.ActionEvent;publicclassJOptionPane{staticintcont=1;publicstaticvoidmain(String[]args){do{JOptionPanepane=newJOptionPane("Conectando... Tentativa "+cont+"...");finalJDialogdialog=pane.createDialog(null,"Teste");Timertimer=newTimer(3000,newActionListener(){publicvoidactionPerformed(ActionEventevt){dialog.dispose();}});timer.setRepeats(false);timer.start();dialog.show();timer.stop();cont++;}while(cont<=3);System.exit(0);}}