A system and method are disclosed whereby the normal mechanism for color inheritance
for the Swing application program interface (API) is altered to provide consistency
with legacy Java applications in which the graphical user interface (GUI) is based
on the abstract windowing toolkit (AWT) in legacy applications. According to the
system and method disclosed herein, if the background color of a GUI object (such
as a button) is explicitly declared, the object will be displayed with that color.
Otherwise, the object inherits the background color defined by global settings
in the Swing API. If no such settings are in effect, the object inherits the background
color of its parent (as is the case in legacy AWT-based applications). This modification
is available in an extension to Swing, referred to herein as AWTSwing.