Java Toolkit.getColorModel()
Syntax
Toolkit.getColorModel() has the following syntax.
public abstract ColorModel getColorModel() throws HeadlessException
Example
In the following code shows how to use Toolkit.getColorModel() method.
//from ww w . j a v a2s.c o m
import java.awt.Toolkit;
public class Main {
public static void main(String[] args) {
Toolkit tk = Toolkit.getDefaultToolkit();
System.out.println("Color model = " + tk.getColorModel());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »