How to change the color of the progress bar and string

Is their anyway to change the color of the progress bar and the string which shows the progress of the bar. The current color of the bar is purple and i would like it to be red or blue so that it stands out against the background of the JFrame i am using. I dont want to change the color of the JFrame
Thanks in advance

import java.awt.*;
import javax.swing.*;
public class ProgressEx {
    public static void main(String[] args) {
        UIManager.put("ProgressBar.background", Color.WHITE);
        UIManager.put("ProgressBar.foreground", Color.BLACK);
        UIManager.put("ProgressBar.selectionBackground", Color.YELLOW);
        UIManager.put("ProgressBar.selectionForeground", Color.RED);
        UIManager.put("ProgressBar.shadow", Color.GREEN);
        UIManager.put("ProgressBar.highlight", Color.BLUE);
        JFrame f = new JFrame("Test");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JProgressBar pb1 = new JProgressBar();
        pb1.setStringPainted(true);
        pb1.setValue(50);
        JProgressBar pb2 = new JProgressBar();
        pb2.setIndeterminate(true);
        Container cp = f.getContentPane();
        cp.add(pb1, BorderLayout.NORTH);
        cp.add(pb2, BorderLayout.SOUTH);
        f.pack();
        f.setVisible(true);
}

Similar Messages

  • When i try to restore my iPad it gets stuck a quarter along the progress bar and won't restore.

    Ok so i downloaded the 4.3.3 update and tried updating but it got stuck about a quarter of the way along the progress bar and won't move. I unplugged it and plugged it in again then tried a restore, it did the same thing, i've done it about 5 times now and it still gets stuck in the same spot each time. I put it into DFU mode and tried a restore but it still won't. Help?

    Hi Tulips 14,
    If you are having reoccuring Error 21 notices when trying to restore your iPhone, you may find the following article helpful, in particular the "Check for Hardware Issues" portion:
    Apple Support: Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/TS3694
    Regards,
    - Brenden

  • How do stop the progress bar disappearing during sync?

    When I'm syncing my iPod Classic to my iTunes I will see a progress bar at the top of iTunes showing how far it has progressed and text letting me know which track of how many I'm on.  But this information will only appear for a second or two before being replaced by the text: "Synching iPod Do Not Disconnect".  The warning will remain visible for aproximately two minutes.  How do I change it so that the progress bar remains visible constantly and the warning does not appear?  Failing that how do I change it so that the information I wish to see remains on screen longer and the warning appears only briefly?

    Press the escape (esc) key to exit full-screen mode.

  • How to change the default look and feel

    Hi.
    Does anyone knows how to change the default Caspian look and feel to, for example, Nimbus ?
    Or the skin feature turns look and feel setting, as We know in java, unnecessary in javafx ?
    I´m using javafx 1.2.
    Cheers

    Canspian is not a look&feel, it's a skin.
    Look&feel only change the SwingComponent,
    regards.

  • How to change the font size and style on run time

    dear all
    i try to change the font style and font size on runtime. I did the following:
    1- i created an item(:font_size) in which i will write the size of the font for the the other item ('customer_name')
    2 on the post_change trigger for 'font_size' i write this code
    SET_ITEM_PROPERTY('customer_name',FONT_size,(:font_size);
    i write 12 then then font size changed , then i write 18 , the size does not change. and when i write any value , no change happens. I do not know why
    the second problem is how to change the font style
    i made three checkbooks (bold,italic,underline)
    on the trugger when_checkbox_checked i write
         IF :BOLD = 'B' THEN
         SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'BOLD');
         ELSE
    SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'REGULAR');
         END IF;     
    no change happend at all.
    please help

    Hi friend,
    it's a really really strange tip... May be it's a Forms bug? I've tried with set_item_property..and.. you're right, it doesn't work..
    So.. you can try making this:
    - create a visual attribute with an specific font size....
    - use the
    SET_ITEM_INSTANCE_PROPERTY('block.item',CURRENT_RECORD,VISUAL_ATTRIBUTE,'you_visual_attribute');
    and call it from psot-change....
    It works
    Hope it helps,
    Jose.

  • How to change the master page and theme dynamically in sharepoint2013 anonymous site

    hi
    I have to change the master page and theme dynamically in sharepoint2013 anonymous site. i have to show one master page to authenticated user  another master page to anonymous user through code
    Srinivas

    Hi Srinivas,
    According to your description, my understanding is that you want to change the master page and theme dynamically based on the anonymous users or authenticated users.
    Per my knowledge, there is not an OOB way to change the master page and theme dynamically.
    SharePoint is based on Asp.net, as we know Asp.Net request processing is based on pipeline model, so we can delevlop a custom HttpModule to dynamic change the master page based on current logon user profile(using SP Object Model to get).
    Another solution could be to use the SecurityTrimmed control that injects the CSS depending on global user permissions, more information, please refer to
    it.
    Some similar posts for your reference:
    http://social.msdn.microsoft.com/Forums/office/en-US/c2b2d0da-c752-4aea-9c2d-e31a5b1a2988/sharepoint-2010-dynamic-masterpage-based-on-userprofile-property
    http://johanleino.wordpress.com/2011/10/20/using-a-different-master-page-for-authenticated-users-in-sharepoint/
    http://sharepoint.stackexchange.com/questions/21679/how-can-we-use-a-different-masterpage-for-annoymous-and-authenticated-users
    http://sivarajan.me/post/How-to-customize-the-SharePoint-2013-Master-Page-for-Anonymous-Users
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to change the full host and domain name on OS X Leopard...

    I recently bought an iMac, and I'm trying to configure it for my network. The question I have is, how can I change the host name and domain name from Skuld.local to skuld.tolharadys.net?
    After mucking around with a few searches on Google, I've gotten the domain name to stick since running domainname returns tolharadys.net. Also I can change the hostname as reported by 'hostname' temporarily by running 'hostname skuld.tolharadys.net' in Terminal.app. However, this isn't persistent after reboots. Ideas are welcome.

    You would need a DNS server on your network configured to answer authoritatively for that particular subdomain.

  • How to change the case structure to string input?

    Hi,
    I have the inner case structure that it will decide to set "DC Voltage" or "DC Current" mode. The "Output Function" contained the selection of function "DC Voltage" or "DC Current". So far it only work with DC Voltage not DC Current. My question is how do I change the case structure to string selector? When the output function is selected to DC Voltage then the case structure is selected DC voltage case. Please help Thanks.
    Attachments:
    test.vi ‏35 KB

    You don't really need to convert the value to a string? The problem is that the value of the individual ring items are not 0 and 1, as you assumed. The values generated by the controls are:
    DC Voltage: 1006
    DC Current: 1007.
    You can find this out by viewing the properties for the "Output Function" and going to the "Edit Items" tab.
    So, all you need to do is change the 0 to 1006 and the 1 to 1007 for your case items.
    By the way, your sequence frame serves no purpose.

  • How to show the progress bar on forms?

    Hello ALL,
    How should we show the progress bar in our forms screen so we can see how much work is remaining?
    For example if we are performing some task through forms, what code and on which trigger we placed this code in order to show the progress bar that inform us about the task in progress.
    Thanks
    malan

    Hi,
    Shouldn't the oracle forms' support the progress
    bar?
    I prefer to have a code which shows progress bar on
    forms.
    Can some one have this code ?
    ThanksPJC progress bars are shown on the form and forms support progress bar and coding itit's relatively easy.
    If I were you I would take Francois' advice and type in "progress bar" in the lil search box :)
    It's a wonder what a lil search can show you
    Tony

  • How to hide the menu bar and Dock

    Howto hide the menu bar and Dock on Mac, I found a tutorial that addfunctions esto info.plist this
    <key> LSUIPresentationMode </ key>
    <integer> 4 </ integer>
    But does not work  which you know another way to do this?

    I have played with 'LSUIPresentationMode' in the past - I may be wrong but I think a value of "1" (and "2" for that matter) only really works in combination with 'LSUIElement' set to a string value of "1". The 'LSUIElement' property of course does away with the application's own menu items so isn't ideal for most applications and since you mentioned using "1" instead of "4", I assume you want your menu items visible all the time.

  • Need Help on How to Change The Encryption Key and or Change security settings

    Hello, i just installed the wireless router and i would like to know how i can change the encryption key or change the security settings (i want it so you do not have to answer it with a password). Thank you in advance.
    Message Edited by DARK_MARIO on 01-06-200706:10 PM

    Hi…
    In order to change the wireless settings of your router you need to login into the router configuration page. Open your internet explorer browser…in the address bar type http://192.168.1.1 ( Default IP address). Leave the username field balnk……type admin as password (If you have not changed the router password). When the setup page loads fully…..click on the tab that says wireless. Just below the main tab wireless ….click on the sub tab that says wireless security. You can Change the wireless security settings here. After the changes are made click on save settings.

  • How to change the network name and line name on iPad 4?

    Could anybody help me how to fix this problem?
    Previously I used qb (a mobile network in Cambodia) for my iPad 4 (iOS 7.0.4 non-jailbreak) the network name is qb.
    The problem is that after I changed to use SMART (another mobile network in Cambodia) for this iPad the network name is still in QB and the Line name changed to SMART.
    I don't know how to fix it now.
    I have tried many methods as in restore through iTunes, reset network setting, reset all setting... but I still could not get the solutions.
    I do hope to get it fix through all your experience.
    Regards,
    Panharith

    Hi Anikesh
    using SU01..u can change the password but can't see the old password..
    Hope this helps, reward with points if it does...;-)
    Regards,
    Tejas

  • How to change the OS name and pass of database server.

    Hi,
    I have a problem with OEM of oracle10g is not running after changing the OS's (windowsXP and Linux 4.5 ) Name and IP-Address, What should I do? OR
    Can anyone give me the metalink document ID to resolve my problem?
    My Database Version is below:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    Thanks,
    Faziarain

    [email protected] wrote:
    But, How to re-create it?Use the following commands. 1st would drop the repository, 2nd would create it.
    emca -deconfig dbcontrol db -repos drop
    emca -config dbcontrol db -repos createPlease note that these commands must run from the terminal/command prompt and not from the sql prompt.
    HTH
    Aman....

  • How to change the long in to string

    Hi
    In my program i get the long value as input.
    Then i send this long value to one method for testing which accepts the argument as String.So i have to change my long in to string then i pass it to the method.
    can anybody tell me how to change my long in to string?
    Thank you so much

    There's probably a method java.lang.Long.toString.
    If not, there's probably something a lot like it in either the Long or String classes.
    I'll leave you the pleasure of looking it up in the API docs.

  • How to change the title bar wdith , scroll bar widths in tune with a 7" screen

    can you please help me customize my user chrome section so that I can REDUCE the WIDTH of the scroll bar ( horizontal and vertical ) . That is , at max the scroll bar can be ___ pixels of __ % of total width. ( prefer the relative reference )
    Also the title bar ( that black surrounding area that bears the minimize, maximize,close buttons ) needs its width reduced to half of what it is now. How do I do this ?

    No. That doesn't work any more. In current Firefox versions native scroll bars are used and you can't do style those via userChrome.css (user interface; chrome windows) and userContent.css (websites). You can try a large theme if you do not want to make the changes via the Control Panel

Maybe you are looking for

  • Getting hang/crash problem when I try to close browser window from applet

    I have a small Apllet that has a button that calls a Javascript function in the opening window, to close the window in which it is loaded. The Applet window is a PopUp window from one of my application's window. First time I start my application and

  • Preview in browser fails with iDisk

    Hi, I have my Mac set to use a local copy of my iDisk to store all of my documents. I open my site from the iDisk icon in Finder. Everything works well and I can access, edit and publish my site with no problems. However when I attempt to preview my

  • Confusions in ABAP while coding

    I always have these doubts in my mind when I work them. Please clear them. 1) what is the difference between include structure and append struvture in a table? 2) Can we attach a transcation to a table? if so how can we do that? 3) How to click a eve

  • I by accident seemed to "delete" my airdrop how do i get it back

    i was trying to transfer a file to air drop but by accident i dragged airdrop into the word document and now it seems my airdrop is gone... i tried searching for it in finder and nothing comes up

  • ITunes has drastically changed in past two days?

    When I connect my iPhone and iTunes starts, it is TOTALLY changed. I have version 11.0.0.163.  I had to really work at getting part of the interface or my usual home page to come up.  I'm sure I didn't make any changes and wonder if it's something I