import javax.swing.*;
import java.awt.Color;
import java.awt.Dimension;
class DisplayArea extends JPanel {
private Color c;
public static final int DISPLAY_SIZE = 500;
public DisplayArea() {
setBackground(Color.white);
}
public Dimension getPreferredSize() {
return new Dimension(DISPLAY_SIZE, DISPLAY_SIZE);
}
}
为什么在“setBackground(Color.white)”中说“找不到符号”