The following can serve you as a good "lesson":
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CounterTimer {
public static void main(String[] args) {
...
Type: Posts; User: andbin
The following can serve you as a good "lesson":
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CounterTimer {
public static void main(String[] args) {
...
Just after the timer() method there is ActionListener counting = .... that the compiler interprets as an instance variable. But this declaration doesn't close correctly. And I suppose it's not what...
I have not analyzed all the code (there can be other bad things) but one thing is clear: your timer() method is never invoked. So remains the new Timer(delay, null) object that does nothing.