User interface themes for Mac OS X, Windows, and Linux define the OS-wide look of window frames, buttons, scrollbars, and the like. Preference settings enable users to tune color schemes to taste. For Java applications, changing the theme also sets colors for pre-defined java.awt.SystemColor
objects that indicate the color of buttons, text, and more. In principal, applications may use these colors to customize their user interfaces to match the current theme. In practice, there are quite a few problems with doing this.
This article begins a series that discusses Java's SystemColors
and their use and problems on different OSes. Series articles also provide color swatches, RGB/HSV values, and downloadable color lists for SystemColors
for each of the standard themes on the Mac, Windows, and Linux. The color swatches provide a resource for comparing theme colors and creating custom Java components that match the themes.
↧
Java tip: How to use SystemColors to access OS user interface theme colors
↧