Package java.awt.color Description
Provides classes for color spaces. It contains an implementation of a color space based on the International Color Consortium (ICC) Profile Format Specification, Version 3.4, August 15, 1997. It also contains color profiles based on the ICC Profile Format SpecificationClass Summary
ColorSpace
This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice. ICC_ColorSpace
An implementation of the abstract ColorSpace class.
ICC_Profile
A representation of color profile data for device independent and device dependent color spaces based on the ICC Profile Format Specification, Version 3.4, August 15, 1997, from the International Color Consortium
ICC_ProfileGray
A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags.
ICC_ProfileRGB
A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags. java.awt Class Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images. A Graphics object encapsulates state information needed for the basic rendering operations that Java supports. This state information includes the following properties: The Component object on which to draw.
A translation origin for rendering and clipping coordinates.
The current clip.
The current color.
The current font.
The current logical pixel operation function (XOR or Paint).
The current XOR alternation color
Provides classes for color spaces. It contains an implementation of a color space based on the International Color Consortium (ICC) Profile Format Specification, Version 3.4, August 15, 1997. It also contains color profiles based on the ICC Profile Format SpecificationClass Summary
ColorSpace
This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice. ICC_ColorSpace
An implementation of the abstract ColorSpace class.
ICC_Profile
A representation of color profile data for device independent and device dependent color spaces based on the ICC Profile Format Specification, Version 3.4, August 15, 1997, from the International Color Consortium
ICC_ProfileGray
A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is TYPE_GRAY and the profile includes the grayTRCTag and mediaWhitePointTag tags.
ICC_ProfileRGB
A subclass of the ICC_Profile class which represents profiles which meet the following criteria: the color space type of the profile is RGB and the profile includes the redColorantTag, greenColorantTag, blueColorantTag, redTRCTag, greenTRCTag, blueTRCTag, and mediaWhitePointTag tags. java.awt Class Graphics
The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images. A Graphics object encapsulates state information needed for the basic rendering operations that Java supports. This state information includes the following properties: The Component object on which to draw.
A translation origin for rendering and clipping coordinates.
The current clip.
The current color.
The current font.
The current logical pixel operation function (XOR or Paint).
The current XOR alternation color
java中的包指的是包中的文件,不包括子目录。
import java.awt.*;是引入awt的所有子类(不包括任何子类)
import java.awt.Color;import java.awt.Graphics;是引入Color和Graphics类(不包括任何子类)
import java.awt.*;是引入awt的所有类(不包括子类)
import java.awt.Color;import java.awt.Graphics;是引入Color和Graphics类(不包括子类)
不好意思,刚才多了一个字
而且我再在里面画矩形时,他的起始坐标是setBounds里的,不是整个窗口的。我的设想是:4个文本框两两一组居中在窗口顶中部,2个按钮在左中部,2个在右中部,
还有一个按钮在右下角。
整个窗口中中部和下中部画矩形,里有图形。
整个是一个简单操作界面,我看的书里面,有关布局的只介绍了FlowLayout,BoderLayout和GridLayout这3种布局管理器,而且很简单。
我也不知道能否把设置的组件分离开,再布置。我才刚学java,上面想法可能很笨,望前辈们见谅,只当是学习。急!!!!
dlg.getContentPane().setLayout(null);
这样就可以在对话框上任意拖放组件了。
缺点是窗口大小变化后,组件的大小,位置不会变。2.<<Think in Java>>中建议用import java.awt.*;
替代
import java.awt.Color;
import java.awt.Graphics;
symbol: class JDialog
location:class Work
JDialog dlg=new JDialog();
~
Work.java:22:cannot resolve symbol
symbol: class JDialog
location:class Work
JDialog dlg=new JDialog();
~
这是我的错误显示。
请大虾们多多指点。