Module java.desktop
Package java.awt

Class SystemColor

java.lang.Object
java.awt.Color
java.awt.SystemColor
All Implemented Interfaces:
Paint, Transparency, Serializable

public final class SystemColor extends Color implements Serializable
A class to encapsulate symbolic colors representing the color of native GUI objects on a system. For systems which support the dynamic update of the system colors (when the user changes the colors) the actual RGB values of these symbolic colors will also change dynamically. In order to compare the "current" RGB value of a SystemColor object with a non-symbolic Color object, getRGB should be used rather than equals.

Note that the way in which these system colors are applied to GUI objects may vary slightly from platform to platform since GUI objects may be rendered differently on each platform.

System color values may also be available through the getDesktopProperty method on java.awt.Toolkit.

See Also:
  • Field Details

  • Method Details

    • toString

      public String toString()
      Returns a string representation of this Color's values. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
      Overrides:
      toString in class Color
      Returns:
      a string representation of this Color