I'd like to know how to add a time delay inside a Swing app in Java, I used Thread.sleep(time), and also I used SwingWorker but it doesn't work. Here's part of my code:
switch (state) {
    case 'A':
        if (charAux == 'A') {
            state = 'B';                    
            //Here's where I'd like to add a time delay
            jLabel13.setForeground(Color.red);
            break;
        } else {                            
            //Here's where I'd like to add a time delay
            jLabel12.setForeground(Color.red);
            break;
        }
}
I hope you could help me or solve my doubts when I'm using SwingWorker.