Change The Swing Application Color

I Have an Application with several screens. There is an option for the user to change the background color for all screens.
But in my case the change will only occur when the application is executed again. (I store the color in a text file and reads it at run time - and change the backgounds of panels accordingly)
Cant I also make the change at that time. The thing is this change should occur for all screens of the application.
Please let me know if anybody have an idea on this ....
Thanks
Shirantha.

UIManager.put("Panel.background",color);
SwingUtilities.updateComponentTreeUI(yourFrame);
best regards
Stas

Similar Messages

  • How do I change the default window color?

    Having white screens is too bright for my eyes!! I always change the default window color in Windows (hiss hiss) to a light shade of gray and that setting carries thru to all windows (i.e. Word, Excel, notepad....). Is it possible to do a similar thing with Tiger? I see that I can choose between a couple of "schemes" from a "Desktop and Dashboard Settings" area (or similar - i don't have my mac here now so can't look to see the proper name) but I see no way to alter colors within those schemes. If you can tell me how to change the default color for my windows I will be awfully happy. thanks.

    Personally, I wouldn't trust it, and I don't hesitate to try these things most of the time even though they sometimes cause problems. But I've used Unsanity products before and they all require installing a preference pane called APE; Application Enhancement module, and that thing caused me lots of problems for my system, lots of crashes and flakiness. I won't use it again.
    But I'm sure there are lots of people using it happily, but if you don't feel confident in dealing with system problems stay away from anything that adds a system preference pane or goes up in the top menu bar at the top (Apple icons excepted) or has to start up with the system.

  • How to change the selection background color of the selected item in the popup menu of the choice box ?

    How to change the selection background color of the selected item in the popup menu of the choice box ?
    By defaut, the selection background color likes "blue", but if I want it to be "yellow" for example, how should I do ?
    Thanks

    The id is applied by (I think) the skin class of the ChoiceBox. You don't need to define it.
    You have to apply the css in an external style sheet. You can apply the external style sheet to any parent of your choice box, or to the scene (the most usual way to do it).
    Example:
    import java.util.ArrayList;
    import java.util.List;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class ChoiceBoxTest extends Application {
      @Override
      public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("Example 2");
        final ChoiceBox<String> choiceBox = new ChoiceBox<>();
        List<String> tempResult = new ArrayList<String>();
        for (int i = 0; i < 10; i++) {
          tempResult.add("Item " + i);
        choiceBox.getItems().setAll(tempResult);
        VBox root = new VBox();
        root.getChildren().add(choiceBox);
        final Scene scene = new Scene(root, 300, 250);
        scene.getStylesheets().add("choiceBox.css");
        primaryStage.setScene(scene);
        primaryStage.show();   
      public static void main(String[] args) {
        launch(args);
    choiceBox.css:
    @CHARSET "UTF-8";
    #choice-box-menu-item:focused  {
    -fx-background-color: yellow ;
    #choice-box-menu-item .label {
    -fx-text-fill: black ;
    Message was edited by: James_D

  • How to change the line's color?

    In a linechart, if the backgroundColor of
    Application is not "#ffffff",there will be some white
    horizontal lines in the linechart. how to change the
    line's color?? thanks

    Hi, I hope this is what you are looking for:
    http://blog.flexexamples.com/2007/11/15/customizing-the-horizontal-grid-lines-in-a-flex-li nechart-control/

  • How can I change the font and color of an email signature?

    How can i change the font and color of an email signature?

    Mail > Preferences > Signature
    Highlight the Signature.
    Click Format in the menu bar and select " Show Fonts".
    Select the Font.
    Highlight the Text.
    Click Format in the menu bar and select " Show Colors".
    Select the color.
    Mail > Preferences > Composing > Message Format:  Rich Text
    Best.

  • How do I change the default application to open files.

    I am rather new to Mac OS (using Leopard). I am rather frustrated, that I have not been able to find a way to change the default application that opens PDF files. I looked around the System Prefernces, couldn't find it, searched the Web, nothing. And I could not find an answer in this forum either.
    So here is my question. How do I change the default application for opening PDF files from Preview to Adobe Reader? I do not want to have to click "open with" every time, I want to open a PDF file.
    And how do I do this for other files also? For instance, I may want to open images files with Photoshop instead of Preview.

    Hey ! I was going mad with the same question - and I'm not a complete newbie - so thanks to William for answering it - I knew I'd seen that dialog somewhere, but just couldn't find it. Text edit was driving me crazy telling me that .ppt files were screwed, now I've got em to open with Powerpoint...
    In answer to your last question, Craig, the dialog that appears to ask if you're sure specifically says the change will relate to all .pdf files ( or .ppt or .whatever ), so it won't stop Preview from opening other types of files.
    Thanks for the help - searched Apple support in vain on this one...

  • I want to change the size and color of text in call out boxes and text boxes. How can I do this? Jack

    I want to change the size and color of text in call out boxes and text boxes. How can I do this? Jack

    Highlite the text inside the text box and then press Ctrl+E.

  • How do I change the tab background color in Firefox 4?

    I just upgraded to Firefox 4. Tabs are now fine black font on dark grey background -- very hard to read. How do I change the tab background color?
    I have searched and the closest I can come is some instructions for modifying .css files, and it is not clear that those instructions will impact the tab background color.
    Thanks in advance for your help.

    Similar question asked by TH received another response.
    Here is the address of that question and answer:
    https://support.mozilla.com/en-US/questions/804464?s=change+tab+color+firefox+4&as=s
    I like the solution recommended there.
    Added information - after several days experience, I notice that some tabs occasionally revert to the original dark grey. So I am still looking for a better solution, ideally within Firefox rather than via add on. This seems like a basic setting for the browser that should be easy to change, rather than something so complex that I need an add on to change it. Or just build it without such a dark grey background to begin with and I would not need to change it.

  • How do I change the workspace background color?

    Hi all,
    I need to change the workspace background color from the
    default mid grey. But I can't find how to do this!
    Any ideas!
    Thanks in advance, Pedro.

    Sorry, but there's no way to change it from the default gray.
    Linda Rathgeber [PVII] **Adobe Community Expert-Fireworks**
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    Design Aid Kits:
    http://www.webdevbiz.com/pwf/index.cfm

  • How can i change the font and color in mail 5?

    how can i change the font and color in mail 5?

    Mail -> Preferences -> Fonts & Colors
    If you want to change the font and color in a message you're composing, you can right-click on the message and use the Font/Show Fonts command to bring up the Font panel (among other ways).
    Regards.

  • I cannot change the default application program. It remains unchanged after attemting to change it.

    I wanted to change the default application proram to view .jpg files to Windows photo viewer. The default program is HP Photo Smart. I went to Tools Options, went to the Applications bar, and found the file type, attempted to change the program, but it did not change it to my selected Windows Photo Viewer. I closed Firefox and restarted it, but it did the same thing, even after logging out.

    I just successfully changed on my .docx to open into Pages. I went the same route that you mentioned... Right click---> Get Info---> Open With and changed it to Pages. When I clicked Change All, a dialog came up asking me if I am sure that I want to change all of my .docx to open in Pages. I click accept and tested it. Now my .docx open in Pages.
    So my question is, is your issue just applying to .ai files? Or is affecting other files, such as .docx? If it's just affecting .ai files, then there maybe an underlying reason for that. And it may not be able to be changed.
    Just a thought.
    KOT

  • Log of the swing application

    When I run a swing application inside JDeveloper, if an exception is thrown, I see a log in Jdeveloper in 'Running' window.
    Is there such log for the swing application deployed using webstart (somewhere on the client machine)?

    Hi,
    see http://www.lecture123.com/elearning/jws-log.html
    Frank

  • How do you change the workspace panel color in Edge Animate CC (the stage is OK) to a lighter gray, I have the dark gray now.  I have Win 7 Pro SP3?

    How do you change the workspace panel color in Edge Animate CC (the stage is OK) to a lighter gray, I have the dark gray now.  I have Win 7 Pro SP3?

    This is a feature as far as I know.
    On Sun, Dec 21, 2014 at 10:32 PM, Conquero <[email protected]>

  • Is it safe for me to change the housing back color on my IPhone 5c?

    Is it safe for me to change the housing back color on my IPhone 5c?

    Meg St._Clair wrote:
    VEFipps wrote:
    Is it safe for me to change the housing back color on my IPhone 5c?
    I'd go a little farther than Peter and say, "No, it's not safe."
    And I'd go a little farther and say, "No, it's not safe," and ask the question of why they didn't just buy the color they wanted in the first place

  • Change the default highlight color

    In the previous version of Acrobat, you used to be able to select a default color for highlighting. I use color-coded highlighting a lot and I can't find a way to change the default highlight color in Acrobat DC. It looks like the only choice I have is to change the highlight color of each highlight individually.  Where did the highlight color preference go?

    After changing the color of a highlight right-click it and click "Make current properties default".

Maybe you are looking for