Trying to set color of frame caption bar

I've been trying to find out how to change the background color of a JFrame's caption bar. It looks to me like the following should do it:
UIManager.put( "activeCaption", new javax.swing.plaf.ColorUIResource( Color.black ) );
I call this code just after setting the look and feel to Windows, and before instantiating any JFrames.
The JFrame caption background is still the default system color. What am I missing?

I've been trying to find out how to change the background color of a JFrame's caption bar. It looks to me like the following should do it:
UIManager.put( "activeCaption", new javax.swing.plaf.ColorUIResource( Color.black ) );
I call this code just after setting the look and feel to Windows, and before instantiating any JFrames.
The JFrame caption background is still the default system color. What am I missing?

Similar Messages

  • To set color for barchart having datetime column

    Hi,
       I have a datetime column in the XSD,
    I was trying to set colors for the barchart through,  chart expert --> colorhighlight  ,here in  colorhighlight when i click on new I am getting a dialogue box asking to enter datetime in M:D:YYYY H:MM:SS TT format. why is this dialogue displayed ? How to overcome this.
    Regards,
    Deepa V

    Hi Deepa
    Please inform us with the following information:
    1: What is the version of Crysatl Reports that you are using?
    2: What is the Chart Type that you are uisng?
    3: Where are you placing this chart in the report?
    Regards
    Ashwini Yadav

  • How to set colors to table control?

    Hi all,
    can we set colors to tables columns and rows?? How can we acieve this? Any help please
    Thanks,
    Madhan.

    Hi All
    thanks for your replies..
    data tab type IF_main_view=>Elements_segment.
      data line type IF_main_view=>Element_segment.
      data node_info type ref to if_wd_context_node_info.
      data attribute_info type wdr_context_attribute_info.
      data attr_value type WDR_CONTEXT_ATTR_VALUE.
      data wd_standard_cell type ref to cl_wd_table_standard_cell.
      data component like line of cl_abap_structdescr=>components.
      data wd_table_column type ref to cl_wd_table_column.
      node_info = lo_nd_segment->get_node_info( ).
      attribute_info = node_info->get_attribute( 'CELL_DESIGN' ).
    if component-name = 'SEGMENT'.
      wd_standard_cell->set_cell_design( CL_WD_ABSTR_MASTER_TABLE_COL=>E_CELL_DESIGN-BADVALUE_MEDIUM ).
    endif.
    i am trying to set color for  some colomns, but i am not getting any colors??? anything wrong in this.. please help
    thanks,
    Madhan.

  • Getting error while setting color to table rows?

    Hi All
    I am trying to setting colors to table rows based on dropdown value.
    lv_Dropdown vaue =1 i want to set one color, 2-another color like that.
    For this I create attribute CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN in node, and i bind this attribute to every column celldesign property in table. and my code in on select of dropdown.
      data lr_column type ref to cl_wd_table_column.
    data:obj_table type ref to cl_wd_table.
    lr_column = obj_table->get_column( id = 'TABLE_WEEK1' ).
    if lv_dropdown = 1.
       lr_column->set_cell_design(
    cl_wd_table_column=>e_cell_design-badvalue_dark ).
    endif.
    lr_column->bind_cell_design( path = 'SEGMENT1.CELL_DESIGN'  ). ...Giving dump at r_colum = get_column( )
    I follow correct code or not??
    Cheers,
    Venkys.

    Sorry Sarbjeet and baskaran i am not getting,
    I want to set colors to row of a table on dropdown selection. In dropdown i ahve a code like
    DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
      DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
      DATA ls_segment1 TYPE wd_this->Element_segment1.
      data lt_segment1 type wd_this->elements_segment1.
      DATA lv_segment TYPE wd_this->Element_segment1-segment.
    navigate from <CONTEXT> to <SEGMENT1> via lead selection
      lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
    get element via lead selection
      lo_el_segment1 = lo_nd_segment1->get_element( ).
      lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
    get all declared attributes
      lo_el_segment1->get_static_attributes(
        IMPORTING
          static_attributes = ls_segment1 ).
    DATA : lv_dropdown type string .
    lv_dropdown =  ls_segment1-segment.
    if lv_dropdown = 1.  SET ONE COLOR TO THAT ROW
    endif.
    if lv_dropdown = 2.  SET ONE COLOR TO THAT ROW
    endif.
    Now what should be the code in WDMODIFYVIEW method to set table row with colors.
    Cheers,
    Venkys.

  • I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different p

    I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different place than where it is on frame 2. Confused!

    Hi Melissa - thanks for your interest. Here's the first frame, the second frame and the tween frame. I don't understand why the tween is changing the position of the object in frame 2, was expecting it to just fade from one frame to the next.

  • I am trying to set up a genius bar appointment on my computer and it tells me "Sorry your session has expired. Please sign in again using your Apple ID account name and password" I know they are correct and use them to sign in on my phone.

    Hi I am trying to set a appointment for the Genus bar on my computer.  I know for a fact that my login is correct.  I have used it to sign in here and make a apointment (had to do it on my phone).  When I get to the appointment area it tells me to resign, and tells me "SORRY" Your lass session has expired.  Pleae sign in using your apple id account name and password.  I have tried resetting my password and all.  I am running Internet Explorer version 11 and my windows is 7.  Any help would be nice...

    ok.. I tried this three times and kept getting that access denied thing when I clicked post my questions. So now maybe I wont have to typ this a fifth time....
    I have a MAC computer with Sync. Was set up under sync Beta. I have an Android phone synced to it that was synced using the pair this device function. It works perfectly. I just got a new Android Tablet and am trying to add it to my sync and it does not seem to have the pair my device function. It insists I log into my sync account. So I try it and it tells me invalid userid/password. I verify and it is the exact email address userid that shows as being my sync account on the MAC. I verify the password on the MAC and it tests out fine. Try the tablet again and invalid.. So I try to reset my password on the tablet and am told my email address/account name does not exist. I just verified it AND Synced my MAC using it!! I have my recovery Key but there is no place to input it into the tablet. There is no place on tablet to enter the link device codes. How can my account be valid and in use on two devices but invalid and nonexistant on the new one? And How do I get the New one to sync with other two?

  • 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();
    }

  • How to set colors on some condition in barchart

    Hi,
    I want to design a crystal report with a barchart. I should specify the color of the bar based on some conditions, this colornames are maintained in the database. I tried using chart expert -> color highlights,
    is there any other way to set the color of the bar?
    Regards,
    Deepa V

    Hi Deepa,
    In charts Color Highlight is the only way to conditionally change the color of the riser bars.
    You can use multiple conditions at a time in color highlight.
    To change the color directly you can right click the bar and select the Format Series Riser and change the color (but not conditionally)
    Regards,
    Aditya Joshi

  • 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);
    }

  • Setting color in a JTabbedFrame

    When trying to set the color in a JTabbedFrame i can set everything except for the title of the selected tab, can anyone give me some help?

    If you just want the selected tab to be green as well, put the following line in your JFrame...
    UIManager.put("TabbedPane.selected", Color.green);
    Example:
    import javax.swing.*;
    import java.awt.*;
    class JTabbedPaneDemo extends JFrame
        public static void main(String[] args)
            new JTabbedPaneDemo().go();
        void go()
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setSize(300, 150);
            UIManager.put("TabbedPane.selected", Color.green);
            JPanel panel1 = new JPanel();
            panel1.add(new JLabel("Foo"));
            JPanel panel2 = new JPanel();
            panel2.add(new JLabel("Bar"));
            JTabbedPane tabs = new JTabbedPane();
            tabs.addTab("Tab 1", panel1);
            tabs.addTab("Tab 2", panel2);
            tabs.setForegroundAt(0, Color.BLACK);
            tabs.setBackgroundAt(0, Color.GREEN);
            tabs.setForegroundAt(1, Color.BLACK);
            tabs.setBackgroundAt(1, Color.GREEN);
            getContentPane().add(tabs);
            show();

  • How to set mouse listener for title bar of JFrame ?

    Hi, all
    How to we can set mouse listener for title bar of JFrame ?
    Please help

    Again, why did you not state this in your original
    question? Do we have to ask you every time what your
    actual requirement is?
    As I said in your last posting, if you don't give us
    the reuqirement in you question we can't help you.
    Sometimes your solution may be on the right track
    sometimes it isn't. We waste time guessing what your
    are trying to do if you don't give us the
    requirement.
    I gave you the answer in your other posting on this
    topic. The AWTEventListener can listen to events
    other than MouseEvents.
    The Swing tutorial has a list of most of the events.
    Pick the events you want to listen for:
    http://java.sun.com/docs/books/tutorial/uiswing/events
    /handling.htmlthe first, i am sory because my requirement not clear so that it wasted everybody time.
    The second, thank for your answer
    The third, AWTEvenListener do not support listener event on title bar
    but ComponentListener can know when we can change frame position.
    please see below that ComponentListener can handle action:
    public void componentHidden(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Hidden");
        public void componentMoved(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Moved");
        public void componentResized(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Resized ");           
        public void componentShown(ComponentEvent e) {
            displayMessage(e.getComponent().getClass().getName() + " --- Shown");
        }Thanks for all supported your knowledge, you are great !

  • I am trying to set up Sharing amongst several computers on my home network.  I have followed all the setup instructions but after completion Sharing does not appear in my iTunes window (on any of the computers I've set up).  There is no explanation why.

    I have been trying to set up Sharing between two computers on my network. I did this once and it worked.  However, when I try to set this up now the Sharing feature does not appear on the left side of the iTunes window (on either computer).  There is no explanation as to why not.  Is this a configuration problem, a network problem or what?   Can it be fixed?  I have tried turning sharing off and back on on both computers but to no avail.  What am I missing?  Thanks for any help you can provide.

    Hey innerev2003,
    Thanks for the question, and welcome to Apple Support Communities.
    If, while searching through your past purchases, items are unavailable to download and show a "Purchased" button, they are still on your computer. It may be best to search your iTunes library by clicking Music, then use the search bar at the top right.
    If you are completely sure the items are no longer in your library, try signing out of the iTunes Store, and then back in.
    iTunes 11 for Windows: Manage your iTunes Store account
    http://support.apple.com/kb/PH12507
    Thanks,
    Matt M.

  • I'm trying to set up my Ipod, but when I go to sign in with an apple ID it says 'Could not sign in: there was a problem connecting to the server'.

    I just bought a 3rd generation ipod touch. It was professionally refurbished. I'm trying to set it up, and everything seems to be working fine, until we get to the wifi. I live on campus and our wifi is username and password protected. I signed in and everything seemed to work fine, and in the top left hand corner I have all the bars for wifi. However, when I go to sign in with an apple ID it says 'Could no sign in: there was a problem connecting to the server'. I've tried turning it on and off again, tried signing on to our wifi again, but it all isn't working. What can I do?

    I also encountered the same problem. Try using a different email address or try signing in later.

  • Trying to set up a new macbook air and it is asking for a keychain password

    I am trying to set up a new Macbook Air and it is asking for a keychain password.  Where do I find one?

    There was an option to Cancel the pop up box which I have now done and it has carried on with the set up - so not sure what it was all about.
    I am going to the Genius Bar tomorrow so will ask the question!
    Thanks for your help Linc.

  • Am unable to Install Adobe Flash, 2. I have a warning saying Jarva script void, could someone please give me some advice with these problems, I am new to Firefox and I am Trying to set up a new home page. Kind Regards, briansheree

    I have installed Firefox 8 and I am trying to set up a Homepage with downloads,Plugins and extension sidebar plus Bookmarks toolbar, with named folders containing my favorite sites, but when as instructed to upgrade Adobe Flash to the latest version the install fails. And I also had a warning in my search bar saying Java script void.

    I have installed Firefox 8 and I am trying to set up a Homepage with downloads,Plugins and extension sidebar plus Bookmarks toolbar, with named folders containing my favorite sites, but when as instructed to upgrade Adobe Flash to the latest version the install fails. And I also had a warning in my search bar saying Java script void.

Maybe you are looking for

  • Requirement in third party orders

    Hello Sap Gurus,       Here is my requirment. I create an order for a material with item category as (TAS) with quantity as 10. Now the vendor here only wants purchase order to be created with minimum quantity of 20 . And i want to do partial billing

  • Mismatch in F.01 and S_ALR_87011990.

    Hi There is mismatch in F.01 and S_ALR_87011990.The variance between two is 1.Could you please suggest how to adjust these difference? Example : F.01-Accumulated depreciation  value =999 S_ALR_87011990-Asset total value=1000 Variance between two is =

  • Powershell and oracle and duplicate data in table

    I have created powershell script to  insert data in oracle table   from csv file and I want to know how to stop insert  duplicate row when Powershell script runs multiple time My powershell script is as follow: '{0,-60}{1,20}' -f "Insert TEEN PREGNAN

  • Can you link files between illustrator and photoshop and maintain layers?

    Want to be able to open an AI file in photoshop, maintain the layers I have in illustrator and be able to edit the AI file and have those edits automatically appear in photoshop.  I think this is possible.

  • Use of JUPanelBinding.setup causes an exception

    Hi, I have a problem with using the setup function of the JUPanelBinding class. here it is: Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread      at java.awt.EventQueue.invokeAndWait(E