Changing color on the title bar

How can I during runtime change the color of the title bar? I want to flash the title bar to warn, but I haven't found the function to set the color of it yet...
Thanks in advance!
Regards,
Andreas

since 1.4 you can use
JFrame.setDefaultLookAndFeelDecorated( true );
JDialog.setDefaultLookAndFeelDecorated( true );to get jframes and jdialogs looking like jinternalframes. but i don't know if it is now possible to change the color.
tobias

Similar Messages

  • Color of the title bar

    HI
    How do you change the color of the title bar of a frame....also is it possible to paint an image on the tile bar so that its looks could be enhanced..pls help

    Hi Arya,
    There are 2 questions here, 1 is simple to answer the other is quite difficult.
    How do you change the color of the title bar of a frameSimply add the colors you want to the UIManager
    UIManager.put("Frame.activeTitleBackground", new ColorUIResource(YOURCOLOUR_BACKGROUND));
    UIManager.put("Frame.activeTitleForeground", new ColorUIResource(YOURCOLOUR_FOREGROUND));
    UIManager.put("Frame.inactiveTitleBackground", new ColorUIResource(YOURCOLOUR_INACTIVE_BACKGROUND));
    UIManager.put("Frame.inactiveTitleForeground", new ColorUIResource(YOURCOLOUR_INACTIVE_FOREGROUND));
    also is it possible to paint an image on the tile bar This is a bit more tricky. You will need to implement your own RootPaneUI which in turn uses a TitlePane class that represents the title bar. In your implementation of the title bar you will handle adding an image.
    Have a look at MetalRootPaneUI and MetalTitlePane to get an idea about the implementation.
    N35Sy

  • How to change color in the title line?

    Hi experts, How to change color in the title line, i show an image for explained better
    !http://img688.imageshack.us/img688/9259/imagenjar.png!
    thanks

    in Views.css file
    file below object.and change border-color as you desired to reflect.
    .TitleTable {
         font-family: arial, helvetica, sans-serif;
         border-width: 0 0 4px 0;
         border-style: solid;
         border-color: #6666cc; ----> change here.
    hope this helps !
    -Niranjan K

  • How can I change the width and color of the title bar of the JFrame

    I would like to use the UImanager to change the look and feel of the title bar on all of my JFrames. How is this possible.
    Thanks in advance.

    I appologize for being rude, and thank you for your response.
    The reason I did not respond was that I don't think that your answer solves the question of top level containers (specifically JFrame). I have been researching the net and some of the text books to come up with an answer before I respond. To this point, I believe that the answer has something to do with changing the boundary. If this is the case I'm within four or five hours of the solution, and will publish. If not, back to the drawing board.

  • Change color of the scroll bar?

    I am trying to turn my entire application black with white or some light colored text.
    Is there some way I can change the color of the scroll bar?
    Also, if I have a JTable, there is a bright grey border I would like to dim down a bit.
    Any guidance would is appreciated.

    Hi,
    This code will show you the current UI settings.
    If you want to change ie. the scrollbar background use:
    UIManager.put("Scrollbar.background", your Color);
    Hope this helps.
    Regards,
    Matt
    Java Developer Technical Support
    Sun Microsystems
    import javax.swing.UIManager;
    import javax.swing.UIDefaults;
    import java.util.*;
    class UIList {
        public static void main(String args[]) {
            // Groups of item objects
            Vector itemGroups = new Vector();
            Hashtable itemList = new Hashtable();
            UIDefaults uiDefaults = UIManager.getDefaults();
            for (Enumeration enum = uiDefaults.keys(); enum.hasMoreElements(); ) {
                Object setting = enum.nextElement();
                String settingName = setting.toString();
                int dotIndex = settingName.indexOf(".");
                if (dotIndex != -1)
                    settingName = settingName.substring(0, settingName.indexOf("."))
                if (itemList.containsKey(settingName)) {
                    Integer groupNum = (Integer)itemList.get(settingName);
                    Vector group = (Vector)itemGroups.elementAt(groupNum.intValue())
                    group.add(setting);
                else {
                    itemList.put(settingName, new Integer(itemGroups.size()));
                    Vector group = new Vector();
                    group.add(setting);
                    itemGroups.add(group);
            for (int counter = 0; counter<itemGroups.size(); counter++) {
                Vector items = (Vector)itemGroups.elementAt(counter);
                System.out.println("");
                for (int counter2 = 0; counter2<items.size(); counter2++) {
                    Object setting = items.elementAt(counter2);
                    System.out.println(setting + " = " + uiDefaults.get(setting));
            System.out.println("\nDone.");
            System.exit(0);
    }

  • Changing icon in the title bar

    Hi all,
    I've seen that applications like NetBeans have custom icons in the title bar of the application (instead of the standard Java Cup). How can I do the same? (i.e. customize the icon).
    Thanks in advance!

    One issue to be aware on Windows is that the icon you set is used both on the title bar (16x16) and when you <alt> <tab> between apps (32x32 or 48x48 on XP). This means that if you create a 16x16 icon it will look kind of chunky when you <alt><tab>. At work we get our art department to create a 48x48 icon that scales down to 16x16 well, a non trival task.
    IL

  • Changing color on the title to an individual slide

    I am preparing a slide show with titles and descsriptions showing on the slide.  On most slides white is acceptable.  There is one slide where another color would be necessary as the title appears on a white background.  I have gone into the menu to File>Font>Show Colors but I can't seem to change the color and description of my slide.

    since 1.4 you can use
    JFrame.setDefaultLookAndFeelDecorated( true );
    JDialog.setDefaultLookAndFeelDecorated( true );to get jframes and jdialogs looking like jinternalframes. but i don't know if it is now possible to change the color.
    tobias

  • How can I change the color of a title bar?

    Ok, I have been looking for this answer for over a week now and nobody
    has yet given me an answer that works. So I am going to ask again.
    Here is a piece of code you can run to see what I am trying to do:
    public class RemoteDisplayFrame extends JFrame {
    public static final Color GRAY70 = new Color(179, 179, 179);
    public RemoteDisplayFrame() {
    super();
    public RemoteDisplayFrame(String title) {
    super(title);
         public void setBorderContent() {
    this.setUndecorated(true);
    JRootPane rootPane = this.getRootPane();
    rootPane.setWindowDecorationStyle( JRootPane.PLAIN_DIALOG );
    this.setRootPane( rootPane );
    public static void main( String [] args ) {
    RemoteDisplayFrame frame = new RemoteDisplayFrame( "Test Frame" );
    frame.setBorderContent();
    frame.pack();
    frame.show();
    Run this code and you should get a frame on your screen that has no
    close buttons, minimize buttons, or maximize buttons, and no menu.
    I want to change the title bar's color to a specific color.
    That color is GRAY70:
    public static final Color GRAY70 = new Color(179, 179, 179);
    If you have any idea on how to do this please do tell.

    AFAIK, you can't. I believe the title bar is rendered by the operating system, using the colors the user has chosen, consistently for all windows. Frankly, if your app could, it would annoy me, as I would still want all my windows to look consistent.

  • How to change the color of a title bar

    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 ?

    import javax.swing.*;
    import java.awt.*;
    class Testing
      public void buildGUI()
        UIManager.put("activeCaption", new javax.swing.plaf.ColorUIResource(Color.YELLOW));
        JFrame.setDefaultLookAndFeelDecorated(true);
        JFrame f = new JFrame();
        f.setSize(200,100);
        f.setLocationRelativeTo(null);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);
      public static void main(String[] args)
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new Testing().buildGUI();
    }

  • Change the color of text in the title bar

    Hi,
    I have a JFrame. I want to be able to change the color of the text in the title bar. Do any of you know how to do this ?
    Please let me know.
    Thanks
    Sangeetha

    If you are using Windows, you do it through the Control Panel tool for customizing your desktop display. If you are using some other system, I don't know. You can't do it from your Java program.

  • How do you change the color of the title text?

    The main title text for the tap your currently on shows up centered one line above the tab row. The default is black text, with a gray drop shadow, but that doesn't work with dark background themes/personas. How do I go about changing that text color so that its visible on a dark background. I've tried changing font stylings in general for the browser, and I've tried changing the color values in the about:config for the persona, but none of that works. How do you change the color of the title text?

    That colors option under content doesn't change the color of the title text, but thanks anyways

  • How to change colors of individual column bar in the same data series

    in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.

    Hi Kiran,
    no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
    Regards,
    Govindu

  • How to change the color of the progress bar and string

    Is their anyway to change the color of the progress bar and the string which shows the progress of the bar. The current color of the bar is purple and i would like it to be red or blue so that it stands out against the background of the JFrame i am using. I dont want to change the color of the JFrame
    Thanks in advance

    import java.awt.*;
    import javax.swing.*;
    public class ProgressEx {
        public static void main(String[] args) {
            UIManager.put("ProgressBar.background", Color.WHITE);
            UIManager.put("ProgressBar.foreground", Color.BLACK);
            UIManager.put("ProgressBar.selectionBackground", Color.YELLOW);
            UIManager.put("ProgressBar.selectionForeground", Color.RED);
            UIManager.put("ProgressBar.shadow", Color.GREEN);
            UIManager.put("ProgressBar.highlight", Color.BLUE);
            JFrame f = new JFrame("Test");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JProgressBar pb1 = new JProgressBar();
            pb1.setStringPainted(true);
            pb1.setValue(50);
            JProgressBar pb2 = new JProgressBar();
            pb2.setIndeterminate(true);
            Container cp = f.getContentPane();
            cp.add(pb1, BorderLayout.NORTH);
            cp.add(pb2, BorderLayout.SOUTH);
            f.pack();
            f.setVisible(true);
    }

  • How do i change font sizes and colors in ical in OS Lion.  Everything is greyed and too small.   And how do I changed the color of the scroll bars, which are now invisible?

    how do i change font sizes and colors in ical in OS Lion. Since upgrading,  all fonts are grey, instead of black,  and too small.   And how do I changed the color of the scroll bars, which also are grey and almost invisible?  And if you can asnwer this, can you tell me how to get back the email format I had before the upgrade?  I no longer have column headings and I'd like them.  Thank you. 

    Do you know about changing the font colors for ical, and the color of the scroll bars?
    No, I don't. I don't use that program; I fiddled with it just now, and could not find a way to do that.
    Perhaps someone else will have an idea.

  • How to change the title bar wdith , scroll bar widths in tune with a 7" screen

    can you please help me customize my user chrome section so that I can REDUCE the WIDTH of the scroll bar ( horizontal and vertical ) . That is , at max the scroll bar can be ___ pixels of __ % of total width. ( prefer the relative reference )
    Also the title bar ( that black surrounding area that bears the minimize, maximize,close buttons ) needs its width reduced to half of what it is now. How do I do this ?

    No. That doesn't work any more. In current Firefox versions native scroll bars are used and you can't do style those via userChrome.css (user interface; chrome windows) and userContent.css (websites). You can try a large theme if you do not want to make the changes via the Control Panel

Maybe you are looking for

  • How can I stop all tracks on an album playing automatically?

    I use my iPod Classic to play backing tracks in my band. I have all our songs in one Album and want to be able to trigger tracks one at a time. But as one track ends the next one starts automatically. I want to be able to trigger the next track mysel

  • Where did I get System 10.2.8?

    This has me completely baffled. I have two CRT iMacs, a Dalmation, and another much older machine. both are running system 10.2.8. Where the heck did I get that system? I need to completely erase and reload the HD in the Dalmation. It was horribly ab

  • How to load properties file

    Hello Everyone, We are experiencing difficulties when trying to load a properties file from a directory other then the one where the servlet is located. We are using the following code for this purpose: private final String PROP_FILE_NAME = "my.prope

  • How do you get what you backed up back?

    Hey, i just recently updated my IPOD 4 to ISO 6. But before updating, i backed up my ipod so i could get everything back on to my ipod after updating it, but i can't figure out how to get everything i backed up on my ipod now. Someone Help me please!

  • Unistall and saving files

    how do I unistall macromedia fireworks mx2004 and save my files i downloaded using fireorks  I tried  catching it and chaning it but missed some is their anyay at all to save the file I make tags (sig tags) for folks I am having a hard time finding t