Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myButton.addActionListener(e -> {
- Card[] cards = selectThree();
- highlightBorders(cards, Color.RED);
- int delay = 1000; // timer delay in msec
- // create a Swing Timer
- javax.swing.Timer timer = new javax.swing.Timer(delay, evt -> {
- // action we want the timer to perform
- highlightBorders(cards, Color.WHITE);
- });
- timer.setRepeats(false); // it performs its action only once
- timer.start(); // start up the timer
- });
Add Comment
Please, Sign In to add comment