I just wanted to use the Windows L&F in a
JFrame
. Now while using a progress bar, the default color is green, similar to the one used in other windows functions like copying of files, etc. Sometimes you might have seen, windows displays a 'RED' - colored progress (when there may be an overwrite in case of copying of files). How can I use that 'RED' color in case of my progress bar, instead of setting the 'foreground color' to 'RED', which looks different?
Java implements the native looking progress bar using their own code. It doesn't support the Vista and newer features that indicate stalled/slow progress by changing the color of the bar.
The source that draws the bar is available to examine; it uses the paintSkin
method to paint the bar, which by default, only paints in one color.
The design guidelines for progress bar use on Windows indicate that you should: