Changig the button color

i have default color for button then based on certain condition i change the color to red then how can i change the color to the default color for the button

button.setBackground(UIManager.get("Button.background"));

Similar Messages

  • Can you change the button color on a custom theme?

    I recently installed a nice theme called Fractal-01 Song of a morning breeze. I had to installan add-on to change the menus that were white and thus invisible, but I have not figured out how to get the grey buttons for like Home and Back and Reload black, and they are very hard to see with this theme.
    I tried changing them in Custom Theme Restorer, but nothing seems to change them to black. I can't imagine that the person who designed this theme would have made these washed out colors that blend into the theme the default, but maybe he or she did. It is a shame to give up on such a nice theme if I don't have to, but it helps if you can see your buttons.

    Hi sherylz,
    It is also possible to edit the theme, but it may be wise to make a copy of it:
    *[https://support.mozilla.org/en-US/questions/940165]
    *[https://developer.mozilla.org/en-US/Add-ons/Themes/Background MDN Reference]
    *Add on to make own skin: [https://addons.mozilla.org/en-Us/firefox/addon/bt-canvas/]

  • How can I change the color of the buttons in Firefox 8?

    I have Stylish, and had a code to change the button colors (Home, Forward/Back, Reload, etc.). But now it isn't working. Is there an HTML code in order to be able to do this with Firefox 8? I would also like a code to change the background color of the Bookmarks Toolbar, if there is one.
    Thanks!

    The box will print... but there is no way to just assign a color to a box. The closest you can get is ot create a small solid colored image in Photoshop and assign that to the box. You may get a resolution warning but as long as it's a solid color it does not matter how few pixels you have.

  • Bizarre IRR Button Colors in IE (Only!)

    When we go to any "Action" dialog from an Interactive Report Region, the button colors, e.g. Apply, Cancel etc. are dark blue with brown writing in IE only We've tested with IE 8 and 9.
    This does not occur in FF, Chrome or Safari.
    Has anyone else encountered this and does anyone know of a fix. We are demoing this next week and; it isn't just aesthetic, the color combination is actually very difficult to read.
    (Yes, I, too, wish that IE would be forever stricken from the memory of Man)
    Thanks and Here's Hoping,
    -Joe

    Joe
    Ironically a combination of IE and Jive ate a lengthy response I made some hours ago, and I wasn't able to post again at that time.
    Joe Upshaw wrote:
    Sorry that this followup is more of a CSS question and less of an APEX question.That's OK. I know more about many aspects of CSS than I do about some of APEX!
    We have a CSS style sheet that we are including as part of the application (via a change to the template).When you say this do you mean that this style sheet replaces the default APEX theme CSS or that it is applied later in the cascade to augment/override the theme?
    However, we don't have any conditional* CSS formatting. I'm unsure of the syntax. I know I could paste the <style> section thgat you provided into the HTML Header section of the page but, as this is global, we'd prefer to do it in the CSS once for the whole app.There's no conditional processing in CSS. The browser applies the last rule it understands, which for this rule is roughly like this:
    /* Older IE & IE8/9/10 */
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr='#eee', endColorstr='#ddd');
    /* IE8/9/10 */
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#eee', endColorstr='#ddd')";
    /* Older Safari & Chrome */
    background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #EEE), color-stop(100%, #DDD));
    /* Safari & Chrome */
    background-image: -webkit-linear-gradient(top, #EEE,#DDD);
    /* Older Firefox */
    background-image: -moz-linear-gradient(top, #EEE,#DDD);
    /* Firefox 16 & IE10 */
    background-image: linear-gradient(top, #EEE,#DDD);So the problem with unconditionally including
    button.apexir-button {
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr='#eeeeee', endColorstr='#dddddd');
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd')"
    button.apexir-button:hover {
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr='#ffffff', endColorstr='#eeeeee');
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee')"
    }later in the cascade is that it will override <tt>background-image: linear-gradient(top, #EEE,#DDD)</tt> for IE10 as IE10 still supports Microsoft's proprietary <tt>filter</tt> property.
    That's why I suggested using conditional comments.
    I tried this:
    button.apexir-button {
    [if lt IE 10] filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr='#eeeeee', endColorstr='#dddddd');
    [if lt IE 10] -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd')"
    button.apexir-button:hover {
    [if lt IE 10] filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr='#ffffff', endColorstr='#eeeeee');
    [if lt IE 10] -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee')"
    }and it did not solve the problem.That's not valid CSS: there's no conditional processing in CSS. We have to use the IE conditional comments in HTML.
    I also directly pasted the style tag version that you pasted above into the example at apex.oracle.com in the HTML header of the page.
    It did not solve the problem there either. Works for me. Needs to pasted in the right place after the APEX theme style sheet to effect the override.
    My recommendation would be to put the override in an external style sheet that you feed to earlier IE versions using conditional comments in each page template, which is the approach that APEX takes for IE workarounds:
    <!--[if lt IE 10]><link rel="stylesheet" href="..." type="text/css" /><![endif]-->There also another alternative: fix the errant APEX CSS at <tt>/i/themes/theme_24/css/4_1.css</tt> if the powers that be will allow it.

  • Button Color

    Hi !
    My program endlessly scans a jTable of 150 row indexes in lenth.
    This jTable directly relates to 150 jButtons ... that depending on the status of thier function at any given time ... each change in color to reflect thier status. The buttons change in color 6 times ie; RED, GREEN, YELLOW,BLUE, GRAY or BLACK.
    Currently I change the button color in this way :
    import java.awt.Color;
    //import .*;
    * @author  Rick
    public class ButtonColorYellow {
        /** Creates a new instance of ButtonColorYellow */
        public ButtonColorYellow() {
            String  F0 = AddRFSwitchMain.jButton500.getText(); // Source of the Room Numbers that equate to the jButtons
              if (F0.equals("101")){
                AddRFSwitchMain.jButton101.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("102")){
                AddRFSwitchMain.jButton102.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("103")){
                AddRFSwitchMain.jButton103.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("104")){
                AddRFSwitchMain.jButton104.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("105")){
                AddRFSwitchMain.jButton105.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("106")){
                AddRFSwitchMain.jButton106.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("107")){
                AddRFSwitchMain.jButton107.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("108")){
                AddRFSwitchMain.jButton108.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("109")){
                AddRFSwitchMain.jButton109.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("110")){
                AddRFSwitchMain.jButton110.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("111")){
                AddRFSwitchMain.jButton111.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("112")){
                AddRFSwitchMain.jButton112.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("113")){
                AddRFSwitchMain.jButton113.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("114")){
                AddRFSwitchMain.jButton114.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("115")){
                AddRFSwitchMain.jButton115.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("116")){
                AddRFSwitchMain.jButton116.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("117")){
                AddRFSwitchMain.jButton117.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("118")){
                AddRFSwitchMain.jButton118.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("119")){
                AddRFSwitchMain.jButton119.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("120")){
                AddRFSwitchMain.jButton120.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("121")){
                AddRFSwitchMain.jButton121.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("122")){
                AddRFSwitchMain.jButton122.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("123")){
                AddRFSwitchMain.jButton123.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("124")){
                AddRFSwitchMain.jButton124.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("125")){
    ..................  etc, etc, etc   ( room numbers are used for index references ie: 101,102, 103, etc)This code works well , but would think there must be a better wat to code it.
    I will make the color itself a var like this:
    AddRFSwitchMain.jButton124.setBackground(new Color( a , b , c ));...... but is there any way to adress the JButtons themselves in a var way??
    ie:
    AddRFSwitchMain.jButton( var X ).setBackground(new Color( a , b , c ));I know ya cant change the jButton lable itself ... but any way to reference the buttons in a like fashion ??
    THANKS !!

    You currently are creating 150 separate buttons each
    independent and unrelated to each other. I would
    reccomend creating an two arrays, one of buttons, and
    another of button status which you can then loop
    thorugh and change with logic
    Something like this:
    Button[] myButtonArray
    int[] myButtonStatus
    init() {
    Button[] myButtonArray = new Button[150];
    int myButtonStatus = new int[150];
    for (int i = 0; i < 150 ; i++)
    myButtonArray[i] = new Button("Button #" +
    n #" + (i + 1) );
    myButonStatus[i] = ** Get Status from
    tus from jTable
    then in Main Code soemthing like
    for (int i=0 ; i < 150 ; i++)
    if (myButtonStatus = 101) then
    ) then
    {myButtonArray.setBackGround(Color.Yellow);
    if (myButtonStatus = xyz ) then
    {myButtonArray[i].setBackGrondr(Color.Black);
    Hope this helps
    JavaPython ....
    Does not your code snip make for 150 lines of code entry listed below? : (
    if (myButtonStatus = 101) then
    ) then
    {myButtonArray.setBackGround(Color.Yellow);
    if (myButtonStatus = 101) then
    ) then
    {myButtonArray.setBackGround(Color.Yellow);

  • How to change the button colour automatically????

    i want to change the button color automatically ,if there is no data in next page ....plzz help

    Hi,
    create a binding for the data collection displayed on next page and do
    styleClass=#{bindings.iterator.estimatedRowCount<=0?'redClass' : ''}
    Then define a custom skin (see how to skin an application in the web developer guide) and use
    .redClass .af|commandButton{background-color:red}
    in this skin. Now when the page renders or when you PPR the button, the color should apply or not. Btw, the same EL on the disabled property or the rendered property would do the same trick (probably better than just a color change)
    Frank

  • Is there a way to change the highlight color for buttons?

    I swear, iDVD has got to be the most counter-intuitive program Apple has made in recent memory. I'm a huge Apple fan but this program makes me want to throw my computer at the freaking wall.
    All I want to do is change the ugly yellow highlight color of the buttons (which appears when you select them) in the DVD menu. I'm making a wedding video, and the DVD menu is all silver, gray, black and white, so the yellow color that it defaults to looks hideous.
    Any help is appreciated!

    Good day Glenn,
    You may want to consider upgrading from Acrobat 9.5 Standard to Acrobat X Pro.  Acrobat X Professional has the redaction tool which is really easy to use. 
    You could also accomplish the workflow you described in your question.  If you right-click the tool-bar, and enable the Properties Bar, you can change the color of your highlighter tool to black.  Then you can 'highlight' the text you would like to eliminate.  After you're done, print the document to the Adobe PDF printer with 'Document and Markup' selected under the 'Comments and Forms' drop-down menu to 'refry' your PDF.
    Hope this helps!
    Kind regards,
    David
    Acrobat Community Manager
    Adobe Systems

  • How to change the background color of a button when the button is emphasized

    Hi,
    I have a button that is in the "emphasized" state, I realized there is a default color "light blue" when the button is emphasized. is there any way I can change this default color? so if mu button goes to emphasized state I can control which color it should be
    I am using "Halo" for the theme, and I was not able to change the Focus color through the "Appearance Window" in Flash Builder 4
    any help would be appreciated

    Take a look at the accentColor flag of <s:Button>. It looks like you can do it there. But, it also looks like emphasized needs to be "true" and that you may need to interrupt the button's automatic update event... I've never tried to do this though. And, I imagine you only need to listen to button state changes if you want to dynamically control the emphasized color. If you just want to set a static value other than the default, it looks like setting emphasized to true and the uint of the accentColor will do the trick...

  • The screen of my mac gets black, while the same the youtube works normally and the buttons maintain the blue color. What should I do?? It gets over after 5 to ten minutes and I only have it 2 weeks..

    The screen of my mac gets black, while the same the youtube works normally and the buttons maintain the blue color. What should I do?? It gets over after 5 to ten minutes and I only have it 2 weeks..

    Welcome to Apple Support Communities
    As this may be a hardware problem, make a backup of your files onto an external drive with Time Machine (if you have important files) and take the Mac to an Apple Store or reseller, or contact with Apple > http://support.apple.com/kb/HE57 You will get your Mac replaced or repaired for free.

  • Changing the button fill color in Captivate 7?

    I am pretty sure that when I used Captivate 6 and I created a button, there was an option in the Properties pane to allow me to change the fill color of the button. I am using Captivate 7 now, and I no longer see this option. Under the "General" tab, it allows me to change the button type, caption, make it transparent, or allows me to see button widgets. Did they remove the ability to simply change the fill color of a button?

    I'm wondering if this is something that was maybe added in a service release. Either that or you may need to reset your preferences.
    Mine has a section titled Fill & Stroke as shown below.
    Cheers... Rick

  • Can't set the text color of a Spark Button

    I'm pretty new to Flex and working on a project with a more senior developer - who's out for a few days. I hope this is a simple question!
    I've got a CTA button that I want red with white text. This is how I'm doing it:
    in fx:Style ...
    .startButton {
    fontFamily: "MyriadPro";
        fontSize: 24;
        chromeColor: #e41937;
        color: #ffffff;
        cornerRadius:7;
    the button ...
    <s:Button styleName="startButton" label="Start" click="currentState=PracticeState'" height="40" width="100"  />
    All of the properties from the style apply except for the color property. Any ideas why it wouldn't? There may be a master style that I'm not aware of, but shouldn't addin the style property here override?
    Thanks!

    Fixed it!
    There was a global style for s|Label and since the Spark button uses one of these for the text, that was it.

  • Change the background color in a button

    I want to change the background color in a button that have a text(It not have an icon).
    DO you know how to do it?

    Hi suasna
    i have a solution for your ask actually i did when i wanted to change the bgcolor of a button ....but i this case u need to use Icon editor to create the icon with the color u want and add to it the text u want to apply ...then set the inconic ptoperty of the button to YES and set the Icon name that u have created with the software ..
    hope this helps u
    thanks

  • How to change the button's clicked color

    Dear all,
    How to change the button's clicked color
    I want it to be white in color as my button's background color is white
    Thanks

    How to change the button's clicked colorvia the UIManager

  • My ipod touch's screen is changing colors and will not respond to the buttons

    my sisters ipod touch is a 4th gen and the screen recently started changing colors, it does not respond to the buttons and will not turn off. should i wait for the battery to die then charge it. she said it started happening when she was charging it. could it be the charging cable? i do not know what OS it has.

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • Is there any way to change the color of the Firefox 4 menu button away from orange? It attracts my attention and as far as I can tell personas change everything but the menu button color.

    Is there any way to change the color of the Firefox 4 menu button away from orange? It attracts my attention and as far as I can tell personas change everything but the menu button color.

    You can change it with the App Button Color extension - https://addons.mozilla.org/firefox/addon/app-button-color

Maybe you are looking for