当前位置: 技术问答>java相关
请问用Color类要import什么库
来源: 互联网 发布时间:2015-06-03
本文导语: 我已经包含了 import java.awt.*; import java.io.*; import java.lang.*; import javax.swing.*; import javax.swing.JPanel; import java.util.Vector; import java.awt.Color; import java.awt.image.ColorModel; import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle...
我已经包含了
import java.awt.*;
import java.io.*;
import java.lang.*;
import javax.swing.*;
import javax.swing.JPanel;
import java.util.Vector;
import java.awt.Color;
import java.awt.image.ColorModel;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.color.ColorSpace;
还是有错
"drawPanel.java": Error #: 300 : variable black not found in class seqanalysis.drawPanel at line 31, column 33
import java.awt.*;
import java.io.*;
import java.lang.*;
import javax.swing.*;
import javax.swing.JPanel;
import java.util.Vector;
import java.awt.Color;
import java.awt.image.ColorModel;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.color.ColorSpace;
还是有错
"drawPanel.java": Error #: 300 : variable black not found in class seqanalysis.drawPanel at line 31, column 33
|
你应该用Color.black来调用这个变量,你不会没有用类名就直接调用了吧!