Changing a color for the whole Application

Hi,
Is there a way to change the color, default purple of swing to some other color(say green) for the whole application without using themes? Is it possible through UIManager.put()?
Regards
Sridhar

Thanks Michael,
I just modified your code to fit my needs.
import java.awt.*;
import javax.swing.*;
import java.util.Enumeration;
class ApplicationColor
  public ApplicationColor()
    setApplicationColor(new Color(88, 140, 165));
    JFrame frame = new JFrame();
    frame.setLocation(400,300);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JPanel jp = new JPanel(new BorderLayout());
    String[] temp = {"abc","123"};
    JComboBox cbo = new JComboBox(temp);
    JButton btn = new JButton("I'm a button");
    jp.add(new JLabel("I'm a label"),BorderLayout.NORTH);
    jp.add(cbo,BorderLayout.CENTER);
    jp.add(btn,BorderLayout.SOUTH);
    frame.getContentPane().add(jp);
    frame.pack();
    frame.setVisible(true);
  public void setApplicationColor(Color color)
    Enumeration enum = UIManager.getDefaults().keys();
    while(enum.hasMoreElements())
      Object key = enum.nextElement();
      Object value = UIManager.get(key);
      Color jfcBlue = new Color(204, 204, 255);
      Color jfcBlue1 = new Color(153, 153, 204);
      if (value instanceof Color)
           if(value.equals(jfcBlue) || value.equals(jfcBlue1)){     
                UIManager.put(key, color);
  public static void main(String[] args){new ApplicationColor();}
}Sridhar

Similar Messages

  • Set global font size for the whole application.

    Is there a way of setting a font globally
    What I mean I want to set a font size for the whole application.
    Is this posable ??
    Thanks Craig

    After posting over 300 questions I would think you would be passed the "New to Java TechnologY" stage.
    The answer for Swing applications is yes this can be done.
    I don't know how to do it for AWT components.
    Since you posted the question in this forum (as oppose to the Swing forum for Swing related problems), I'm assuming this is an AWT related question and therefore I can't help you.

  • How to store global values for the whole application to use ?

    Hi,
    In our application, we have global values that is store in a parameter table, I want only to query it once, and it will be used every where from the whole application.
    e.g :
    I have general parameter tables that store :
    % Tax
    Current Period
    etc..
    Then these values will be used in our business rules in the whole application.
    How can I do that in ADF BC ?
    Thank you,
    xtanto

    I would go ahead and create a transient VO with an attribute called "userLanguage" and store the value at the initialization step.
    We generally call this type of VO as PVO which is a transient VO and contains only 1 record at any point of time. Keep this VO inside the RootAM and you can write a static util method as below..
    public static String getUserLanguageFromPVO()
    PVOImpl pvo = (PVOImpl)am.findViewObject("MyPVO");
    if(pvo != null)
    Row row = pvo.first(); //Always returns the one record
    return (row == null ? null :
    (String)row.getAttribute("UserLanguage"));
    return null;
    }

  • Cannot change multiple colors for the life of me

    Hi there-
    I am VERY new to photoshop and have been trying to change just two colors in this stupid picture now for about five days. I realize this is rudimentary probably for most users.
    I have searched extensively online and experimented using the color replacement tool and the "replace color" adjustment under image.  I will attempt to attach the before image and the after image I have been able to come up with.
    Essentially, I just want to replace the red and green with orange and black.  The orange I have is a very specific pantone (I have both RGB and CMYK numbers that I'd like to use).  If possible, I'd like to keep the shading....I think this is the biggest problem.  Colors are not uniform.
    Anyways, if this is going to take me a long time that is fine, I just don't know how to do it and have all the edges and shading look correct.  I cannot find a tutorial anywhere online that even shows how to clean up an image after you have changed its color so it looks professional.  I am going nuts.  This is for a job application and if you know how to do this and can help me - please!  Help!

    The orange I have is a very specific pantone (I have both RGB and CMYK numbers that I'd like to use).
    Doesn't mean anything in relation to spot colors. That's the part you  seriously must understand - either you  want to print it prodfessionally and a spot color is mandatory or it isn't. Process color CMYK is also used in professional print, but requires to work with color management. RGB is just for on-screen, web or printing on your home printer. Each of the methods will require a different way of shifting/ remapping the colors. For RGB and process CMYK, a gradient map adjustment layer might work, including of course converting to CMYK for the latter and dealing with color management. If it's just for home printing on unmanged printers like your personal inkjet, anything from hue shifting to selectiove color corrections will do. For spot colors you can forget these "dumb" methods and will have to learn how to create selections, manage channels and work with Dutone/ tritone/ multichannel modes.
    Mylenium

  • Changing hyperlink colors for the navigation bar

    hello all i am trying to figure out how to change the color of the links that are the top of my page in the navigation bar. i know how to do it with the ones in my text- but i cannot figure out how to do so for the ones at the top of each page in the navigation bar.
    any help would be much appreciated!

    Welcome to the Apple Discussions. Here's a link to a post by Cyclosaurus, the resident java script expert, about changing the font, etc. in the navbar with java script and a HTML snippet.. Don't know if includes color also.
    http://discussions.apple.com/thread.jspa?messageID=8600361#8600361
    OT

  • Setting character encoding for the whole app

    I have a MySQL base which uses latin1 character set. I don't know which Java uses, but when I print some polish signs it puts ? instead. How do I change the character set for the whole application? Or maybe there is some completely different way?

    1. the base I have is capable of storing polish chars - at least when I view it within my visual manager it shows then no problem, so I think it's not that
    2. I don't use the console - I use the JTable component to show the data
    3. java stores using utf, but the app uses default system encoding - I checked it with:
    Charset c = Charset.defaultCharset();
    System.out.println(c.displayName());So which solution do you suggest?
    And how can I change the encoding the application?
    Thank's for your interest!

  • How do i change the backgound color for the "file edit view history bookmark tools help" bar in Firefox 29.0

    how do i change the backgound color for the "file edit view history bookmark tools help" bar in Firefox 29.0

    You can add a solid color theme to change the color of the top of the browser window, which includes the Menu Bar.
    https://addons.mozilla.org/en-US/firefox/themes/solid

  • How can I change the default program for the external applications editor?

    I have read the on line directions for this and it reads "select a file type in the left pane."   I do not see where this is in the left pane.  All I see in the left pane is "Browser start pages" and a "How do I " Pane.  Nothing with file types.

    Hello,
    Welcome to Adobe Forums.
    In order to change the default program for the external applications editor. Please follow the steps as mentioned below.
    Click on Edit menu then choose preferences.
    Once the preferences dialog box open.
    click on file editors.
    On the Left pane you will find all the file types which you want to edit .
    On the right hand side you will find the editors for that specific file type.
    If you want to add any other application you need to click on + symbol at the top of right pane.
    Select the path of that application which you want to apply.
    clcik on open.
    If you want to make it primay you can click make primary option available at the right hand top. For more detials please check the screenshot below.
    Regards,
    Rajeev

  • ADF :  Value change listener for the whole jsff page

    Is there any feature to have a value change listener for the whole jsff page ?
    How to know if user has change something in the page i.e. how to know whether the page is dirty ?

    User please tell us your jdev version!
    Read this blog https://blogs.oracle.com/groundside/entry/ever_wondered_how_uncommitteddatawarning_works
    Timo

  • How to change the color for the af:messages by skins ?

    Hello All
    How i can change the text color for the af:messages by skins,i want change the color for the messages paragraph not for message header
    Because i know how to change the message header color text by
    .AFErrorTextForeground:alias
    color: Red;
    Error:
    1. You Must Select etc...
    2. Hello All
    i want to change the color nor for the header (Error) ,i want change it for the messages 1 and 2 and its text.
    Regards
    Mohammad Weshah
    )

    Hi Frank
    Unfortunately it dose not work.
    Any another options for this issue .
    Regards
    Mohd.Weshah

  • IOS 7: Will there be updates to change colors for the Notes

    iOS 7: Will there be updates to change colors for the Notes & Text msgs? The white background washes out the text.

    Nobody here has any knowledge of what Apple may or may not include in future updates.
    You can send feedback to Apple about your wishes though - http://www.apple.com/feedback/

  • Changing the font color for the complete row based on the Keyfigure Values

    Hi Experts,
    Can any one help me to find a solution for this?.
    I have a requirement, in which the Font color for the complete Row needs to be set to RED in Bex Report, when the corresponding Row Keyfigure is more than a particular value.
    Ex: Notification-Material-Customer-Def Qty-delivered Qty
          1000000 - XXXXX- AAAAAA-10-1000
    in the above example, when the Defect qty increses more than 10, then the complete Row Including the characterstics, Notification, Material, and customer Should be Highlighted in Red. This has to happen automatically once the Query is refreshed.
    Please let me know if you have any suggestion here?.
    Regard,
    Muruganand.K

    Hi,
    Step 1: Click the Format Menu in Excel(BEX Analyzer)
    Step 2: Click the Style submenu
    Step 3: there will be number of SAPBEX formats available. Each of these relates to another cell of BEx (Header, Cell Data,
                Result  Row, Hierarchies, etc.). Also, they depend on data types.
    Step 4: Select SAPBEXchatext
    Step 5: Click Modify. This displays all the standard formatting option as shown below.
    Step 6: Select Font, Color (Background/ Font).
    Step 7: Click OK on both the screens. The entire BEx output result row Font and color is modified.
    Hope it helps........
    Regards,
    Suman

  • Is there a way to activate the whole application in Non Development system?

    Hi All,
    Is there a way to activate the whole application in Non Development system? Using some BRF Plus Tool.
    We copied a sample application and customized the same as per our requirement. The same is then released to Test System for testing. On Test system this application with all component is in non-active state. We re activated the application with all the component and released it to Test System. But still the application is inactive.
    Application is a of storage type system and so cannot use changeability exit to activate on test system.
    TR log shows imported with error. Below is the extract of the error:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    BRF+: Runtime client: 000 / target client: 400
    BRF+: Object activation of new version started for 418 object IDs
    BRF+: <<< *** BEGIN: Content from Application Component  CA  *** >>>
    BRF+: <<< BEGIN: Messages for IDs (53465BA36D8651B0E1008000AC11420B/ )  Table 'Dunning Proposal Line Items (Table)' >>>
    No active version found for 23.04.2014 08:14:10 with timestamp
    No active version found for IT_FKKMAVS with timestamp 23.04.2014 08:14:10
    No active version found for IT_FKKMAVS with timestamp 23.04.2014 08:14:11
    BRF+: <<< END  : Messages for IDs (53465BA36D8651B0E1008000AC11420B/ )  Table 'Dunning Proposal Line Items (Table)' >>>
    BRF+: <<< *** END  : Content from Application Component  CA  *** >>>
    BRF+: Object activation failed (step: Activate )
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    BRF+: Import queue update with RC 12
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Errors occurred during post-handling FDT_AFTER_IMPORT for FDT0001 T
    FDT_AFTER_IMPORT belongs to package SFDT_TRANSPORT
    The errors affect the following components:
       BC-SRV-BR (BRFplus - ABAP-Based Business Rules)
    Post-import method FDT_AFTER_IMPORT completed for FDT0001 T, date and time: 20140423011412
    Post-import methods of change/transport request DE1K901989 completed
         Start of subsequent processing ... 20140423011359
         End of subsequent processing... 20140423011412
    Any help would be appreciated.

    Is IT_FKKMAVS part of the same transport request or was it sent already earlier?
    You may have a look at the request if it was OK. Probably not.
    Maybe in the meantime more requests reached the system that now have in combination solved the problem. What is your release and support package level?
    Higher versions of BRFplus have a lot of automatic correction mechanisms built into it.
    E.g. problematic imports are collected in an import queue. As soon as a request comes in that fixes any problems the after import processing for faulty imports is automatically redone.

  • How to disable the Directory listing for the whole server or a particular a

    Please let me know how to disable the Directory listing for the whole server or a particular application.
    Thank You

    I want to disable the tab focusing( tab index) for a JTextField objectsLook through the API and find methods with the word "focus" in the method name.
    Also can u tell me about how to change the tab index orders for JTextFields."How to Use the Focus Sub System":
    http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html

  • Can you no longer have a background color for the text box in the new version of hp photo creations

    just updated to the new version of HP Photo Creations, used to be able to have a colored background for the text box - is that no longer possible in this new (not better) version????!!!!! Uuuuuuuuuugh

    Hi Lainey.
    Thanks for asking. We're working on bringing back that feature. In the meantime, here's another way to add text backgrounds: Add a placeable graphic and then click the Arrange button to send it to the back, behind the text.
    That approach also gives you more interesting shapes. The new alignment guides make it a snap to align a graphic with a text box. In the example below (it may take a day for the image to show up here), I also used the new Premium Editing Features to change the color of the graphic.
    P.S. — Applying a thick border to an empty text box (also using the Premium Editing Features) is another way to create a background shape. That has the advantage of letting you pick any color for the box. You'll also find several new text styles at the bottom of the new text menu.
    Let us know if we can help further,
    RocketLife 
    RocketLife, developer of HP Photo Creations
    » Visit the HP Photo Creations Facebook page — news, tips, and inspiration
    » See the HP Photo Creations video tours — cool tips in under 2 minutes
    » Contact Customer Support — get answers from the experts

Maybe you are looking for

  • My charger for my MacBook Pro

    My charger for my MacBook Pro has exposed wires. It is still woking, but I am afraid the exposed wires will cause a fire or may even shock me. I am no longer under warranty because I bought my MacBook Pro in 2011. What can I do? I looked at chargers

  • MVP List #136 January 31, 2015 – February 6, 2015

    The Verizon Community Forums Most Valuable Posting List is where we recognize the great work that you all, our community, continue to do each week in these forums. Even if you're not listed below, a huge THANK YOU to all of your contributions. If you

  • HT4906 if i delete images from photo stream do they stay in events

    if i delete images that i have made into events in iphoto, can i delete them in my photo stream on my macbook

  • Serializing derived complex types from XML

    Hi all, I am having a hard time serializing derived complex types from XML. I used the "Import Web Service" wizard to create proxy classes for the SOAP described elements. The XML that I am consuming comes from a .NET backed and include typing statem

  • Workflow in maintenance plan

    Hi All, I need a workflow to update the scheduling parameters in a maintenace plan. Is there a standard WF to do this? Regards, Rogério Reis