Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to change the color of a title bar

843806Mar 11 2008 — edited Mar 12 2008
Hello !
I try to change the color from my title bars, but I fail.
I tried to change the activeCaption value to an other colour, but that didn�t work. Currently I use a own LAF and set it with UIManager.setLookAndFeel("dpg.beans.GuiWindowsLookAndFeel");


import javax.swing.UIDefaults;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;

public class GuiWindowsLookAndFeel extends WindowsLookAndFeel {
  
  protected void initSystemColorDefaults(UIDefaults table) {
    
    String[] colors = {
       "activeCaption", "#B0171F"  
     };
    
     loadSystemColors(table, colors, false); 
     
   }
}
I also used the complete stringarray from WindowsLookAndFeel and only changed that one color. Still no changes.


Any ideas ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 9 2008
Added on Mar 11 2008
7 comments
2,925 views