Timer Help
publicclass ButtonHandlerimplements ActionListener{
publicvoid actionPerformed(ActionEvent e){
String str = e.getActionCommand();
long g = Math.round(100*Math.random());
if (str.equals("Binary")){
squarePanel[new Long(g).intValue()].setBackground(Color.RED);
if(g == guess){
squarePanel[new Long(g).intValue()].setBackground(Color.RED);
}
else{
squarePanel[new Long(g).intValue()].setBackground(Color.WHITE);
}
}
}
I need some help on the timer class in java.I need to display a squarePanel to red..but after a few seconds later, i need to change it to blue after selecting another panel to show that it is selected before..After which, i will continue clicking the button until i select the correct squarePanel..any idea how to go about doing this?

