如何在JPanel

时间:2017-02-19 15:14:57

标签: java swing

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)”中说“找不到符号”

0 个答案:

没有答案