How can I reset the background color of a JPanel to it's default value?

I have some JPanels that I set their background color to white when I add some objects in them. After some operations the objects are removed and I'd like to reset the background color back to it's default gray. Any suggestions on how to do this? Thanks.

I took a guess and I figured it out. Just set the background color to null.
JPanel panel = new JPanel();
panel.setBackground(Color.white);       //Set Panel to White
Operations......
panel.setBackground(null);                 //Reset Panel Color to Default Gray

Similar Messages

  • How can I change the background color in the inbox?

    The background color in my inbox (well, all mailboxes) is white. A yellow background would make the existing black text a lot easier to read. How can I change the background color in the inbox?

    Themes work in Thunderbird - duggabe was not refering to Firefox.
    Another useful addon is theme and font changer:
    * https://addons.mozilla.org/fr/thunderbird/addon/theme-font-size-changer/
    However, Thunderbird allows you to modify all sorts of things.
    Make hidden files and folders visible:
    * http://kb.mozillazine.org/Show_hidden_files_and_folders
    Help > Troubleshooting Information
    Click on 'show Folder' button
    a window opens shwoing profile folder name
    Close Thunderbird now - this is important
    In the profile name folder, Create a new folder called '''chrome''' - note the spelling
    It should be in the same place as the 'Mail' folder.
    see first image below.
    Open Notepad
    Can be located : Start > Programs > accessories
    Copy everything shown between the lines below.
    Paste into Notepad.
    Save as '''userChrome.css''' - note the spelling (edit updated - this was a typo error)
    This should be saved in the '''chrome''' folder.
    see second image below.
    Restart Thunderbird.
    I have chosen a yellow for you
    <pre>
    #f6f58c = a yellow....it is a hex code for a colour.
    </pre>
    You can change it if required. Remember when updating anything in the profile folders, you must close Thunderbird first.
    More info on colours.
    * http://www.yourhtmlsource.com/stylesheets/namedcolours.html
    <pre>
    * Do not remove the @namespace line -- it's required for correct functioning
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    /*Background colour for message list*/
    #threadTree > treechildren::-moz-tree-row {
    background-color: #f6f58c !important;
    </pre>
    -------------------------------------------

  • How can i change the background colors on my iphone. The new white is hard on my eyes. I dont care for the grey boxes either.

    how can i change the background colors on the new update? I find the white a bit much. Also is there anyway I can change the grey boxes they seem out of place.

    That makes me sad. thannk you

  • How can I reset the screen colors/resolution on an old white macbook?

    My screen shows neon colors and a zigzag shapes.  How can I reset the color resolution?  This laptop was supposedly fixed but when returned all my data had been "lost".  The certified mac tech said he reinstalled the OS but lost all my desktop files and HD and couldn't recover.  ODDLY, when I started the machine and started fresh, my old hard drive was still there!  Although he'd wiped out my current desktop files- gone.  But, the  screen colors went wonky all of the sudden and I don't know how to resert or correct the resolution.  Can any one share a suggestion?

    With that kind of issue after returning from a repair where a tech was inside the computer, it should be returned to the same place for an evaluation of the problem, a diagnosis, and perhaps they need to check their work to see if something came loose while they had it apart.
    The System Preferences> Displays has a panel to select settings.
    You may have to try & see about a reset of System Management Controller http://support.apple.com/kb/HT3964 Or, if reset of NVRAM  http://support.apple.com/kb/HT1379 may help. Not sure if these would do anything if there is hardware damage.
    Good luck & happy computing!

  • How can i change the background color in the heading when i add a new page

    How can I change the background in the heading on a new page? When you add WELCOME page the heading color is tan, the ABOUT ME page the heading is light blue, the PHOTOS page the heading block behind the heading text is light green, etc. How do I change those colors?

    you can change iweb navbar any which way you want, as long as you know iweb widgets:
    http://iwebwidgets.cyclosaurus.com/iWebNavBar/BkgndColor.html
    you won't see the change in iweb, you only see it in published site.

  • How can I change the background color of my podcast's iTunes page?

    My RSS feed just got accepted but now I need to customize the title, author, background color, and logo of my site. Does anyone know how to do this? Thank you!

    You can't change the background colour - it's white for audio and black for video. The other data can be changed by changing the appropriate tag in the feed, or if you're using a program or online service to make your podcast,. wherever they provide for entering this information.
    The title is carried in the 'title' tag; the author in the 'itunes:author' tag, and the 'podcast image' which appears on the Store page in the 'itunes: image' tag. Republish the feed after making the amendments: it will take a couple of days for the new data to appear, though the image may take several days.
    The image which appears in some podcasts in the bottom left-hand corner of iTunes when subscribing is not referenced in the feed but has to be actually embedded into the media file: please see this page:
    http://www.wilmut.webspace.virginmedia.com/notes/coverart.html
    You may find this general page on making a podcast helpful:
    http://rfwilmut.net/pc

  • How can I change the background color of a chart?

    How can I change the default black background color of a chart to white?
    Thanks
    John

    Hello All,
    Another (and my preferred method) of bringing up the tools palette is to press
    <shift>+<Rt-Click>.
    Just another way to do something in LabVIEW!
    Travis M
    LabVIEW R&D
    National Instruments

  • How can I set the background color of JLabel?

    Can any one tell me how to set the background color of a JLabel?
    I have:
    JLabel prop = new JLabel("blahblah");
    prop.setBackground(Color.red);
    Thank you in advance...

    JLabel prop = new JLabel("blahblah");
    prop.setBackground(Color.red);
    prop.setOpaque(true);

  • How can I restore the background color Firefox 13 used for displaying images?

    I preferred the darker background color introduced in Firefox 13 for when images were displayed standalone, as opposed to the glaring white. How can I restore that behavior?

    That should still happen.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can also check for a userChrome.css file with code to change the background color.
    The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.
    *http://kb.mozillazine.org/Editing_configuration

  • How can i change the background color in the mobile windows adobe reader app? i want to change it from black to white but don't know how.

    really want to change the background color of my documents in the mobile app. ive tried to search the answer online, in blogs and other various 'life hacks' blogs or articles, but so far everyone is talking about the desktop version. i really want to figure this out. is there even an option for the mobile version for windows? the only editing icons when a document is open are: export, home, make public, search in document, highlight/strikethrough/underline/comment and continuous/single view. if there isnt an option to edit background color, can i suggest that the makers of the windows mobile version make one, and make it fast please! any help would be appreciated. -CHANGE BACKGROUND COLOR

    hi, thanks for helping me ...
    i have used the above url and made changes to my OAF page, but i didn't get the desired output and its also giving as the above code output .
    i kept OraBgGrayVeryDark in Css style in property inspector for every region including PageLayout and i also did some changes in cabo/styles/*.css classes.
    eventhough it is picking the color upto footer level only and it is not applying for advanced table also.
    can anyone please give your views in this..

  • How can I change the background color in text box using RGB format

    Can some one tell me if Mac Pages (version 5.0) allows users to customize the background color of a text box using RGB color format?  It appears that the text color can be changed using RGB but background color is limited to a few standard colors.   Thanks

    They are just sample swatches, use the Color Picker to choose anything you want.
    Peter

  • How can I change the background color of a menu ring?

    Hi
    Does anybody know how to change the background color of a menu ring??? (not the backround color of the first item, the background color of the list (remains always gray))
    thanks martin

    Try Preferences>>Colors>>Menu Background, but this will change ALL menu's background color.
    Hope this helps

  • How can I change the background color of odd/even rows in a panelCollection

    Hi everyone.
    I'm using a panelCollection and I need to change the backgroung color for odd/even rows in the table,
    how can I do this, using a stylesheet, is there a special selector or property for this?
    globalResultCollection (UIPanelCollection object) , is a collection of UITable elements, and it's working fine.
    I just want to change the defaul background color for rows.
    Thanks
    <af:panelCollection id="GLOBAL_RESULT_COLLECTION"
    binding="#{admin.view.globalResultCollection}"
    styleClass="globalResultCollectionRegion"
    clientComponent="true">
    <f:facet name="menus">
    <af:menu id="GLOBAL_OPERATION_MENU"
    binding="#{admin.view.globalOperationMenu}" />
    </f:facet>
    <f:facet name="toolbar">
    <af:toolbar inlineStyle="width:100%"
    binding="#{admin.view.globalOperationToolbar}"
    id="OPERATION_TOOLBAR"/>
    </f:facet>
    </af:panelCollection>

    Hi,
    use this:
    af|table::data-row af|column::data-cell { background-color: #CCCCFF; }
    af|table::data-row af|column::banded-data-cell { background-color: #FFCCCC; }
    Regards,
    s o v i e t

  • How can I change the background color?

    It may seem like a small thing but I am very disappointed with my new Motorola
    Droid Turbo. I use it at night quite often and so far I can't find a way to get rid of this glaring white background. Contacts, messages, etc all are blinding to look at in a dark room. The RAZR that I just upgraded could easily be set up to have white or sometimes blue text on a black background for nearly everything. This is a very big deal for me and a source of endless frustration as I look for a night mode setting or anything else that can keep me from staring at a blinding white screen in a dark room even with the brightness turned as low as possible. How can I go back to all that black that I loved on my older phone?

    Well there are Launcher apps you can Download that might help you'll have to check them individually,  you can make adjustments in your Back Ground lighting instead of using Automatic un-check that and use manual Drop the level to 5 to 10 percent that should help some,  I have my Droid Maxx set like this..

  • How can i change the background color in the itunes store window from black?

    I can't use the iTunes store because the font and the background are both black. The change took place during a recent upgrade.

    Themes work in Thunderbird - duggabe was not refering to Firefox.
    Another useful addon is theme and font changer:
    * https://addons.mozilla.org/fr/thunderbird/addon/theme-font-size-changer/
    However, Thunderbird allows you to modify all sorts of things.
    Make hidden files and folders visible:
    * http://kb.mozillazine.org/Show_hidden_files_and_folders
    Help > Troubleshooting Information
    Click on 'show Folder' button
    a window opens shwoing profile folder name
    Close Thunderbird now - this is important
    In the profile name folder, Create a new folder called '''chrome''' - note the spelling
    It should be in the same place as the 'Mail' folder.
    see first image below.
    Open Notepad
    Can be located : Start > Programs > accessories
    Copy everything shown between the lines below.
    Paste into Notepad.
    Save as '''userChrome.css''' - note the spelling (edit updated - this was a typo error)
    This should be saved in the '''chrome''' folder.
    see second image below.
    Restart Thunderbird.
    I have chosen a yellow for you
    <pre>
    #f6f58c = a yellow....it is a hex code for a colour.
    </pre>
    You can change it if required. Remember when updating anything in the profile folders, you must close Thunderbird first.
    More info on colours.
    * http://www.yourhtmlsource.com/stylesheets/namedcolours.html
    <pre>
    * Do not remove the @namespace line -- it's required for correct functioning
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    /*Background colour for message list*/
    #threadTree > treechildren::-moz-tree-row {
    background-color: #f6f58c !important;
    </pre>
    -------------------------------------------

Maybe you are looking for

  • 11i to r12 Conversion - help needed

    Hi My client is doing re-implementation of r12 and migrating from 11i to r12. I need help particularly on conversions side. The client is a SaaS company. they are considering to bring open and history transactions and applied/unapplied receipts to r1

  • Apple AirPort WiFi connects to MacBook Air and iPad but not iPod Touch

    I got my iPod touch 4th Gen in December for xmas and the wifi has worked perfectly fine until about a week ago only on my ipod, it just says 'Unable to Connect' everytime I try and connect but works on my MacBook Air and iPad It's a WPA2 Personal sec

  • Replace Text In SQL Scripts

    Hi, I would like to search and replace text in files when I run .sql files. E.g. When user provide scripts xyz.sql, they would put table name like INSERT INTO  xyz abc VALUES ('text');I would like to replace xyz abc with mytablename. INSERT INTO  myt

  • Opening eps files  in illustrator cs3, created with GMT

    I have been using previous versions of illustrator (10.0, 11.0, 12.0) to edit my eps files created with GMT (Generic Mapping Tools) with no problem. I have just recently installed CS3. When I open these GMT generated eps files the colors are changed

  • Help me to display result

    this is my class that i want to get result from : class QuickSorter      long StartTime, EndTime,Compare=0, Move=0;      int[] array;      public QuickSorter(int[] unSorted)           array=unSorted; public void quickSort(int lowIndex, int highIndex)