CeciliA CeciliA - 1 year ago 46
Java Question

How can i call JFrame with another JFrame after 2 Seconds Delay

new SplashDemoGUI().setVisible(true);
try {
new sample().setVisible(true);
} catch (InterruptedException ex) {


Maybe someone can help me, I`ve put it in public main. Thanks in Advance.

Answer Source
new java.util.Timer().schedule( 
    new java.util.TimerTask() {
        public void run() {
            new sample().setVisible(true);

This should do the job.