我该如何解决这个错误?
错误:预期的timer.start()
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
import javax.swing.JFrame ;
import javax.swing.Timer ;
/**
This class illustrates using a Timer with a listener
The listener illustrates using an interface.
The program also illustrates that the inner class has access
to constants in the local environment, but not variables.
This is an example from the book, so the answer is there.
Your job is
1. write the line that makes the Rectangle component,
remembering that it will have to be …Run Code Online (Sandbox Code Playgroud)