TitledBorder is not updated visually right away

Hello, I have created TitledBorders that are aware of the color they should be painted with.
By subclassing TitledBorder, I created a new border which registers itself as an observer to be notified when the color should change. Upon receiving a notification, I call:
setTitleColor(newColor);
setBorder(BorderFactory.createLineBorder(newColor , 1));The problem is that the titledborder is not updated right away.
However, if I resize the frame the titledborder is in, then it automatically paints itself with the correct color.
It seems like a problem of receiving the painting even to that boder.
What can I do?

setTitleColor(newColor);
setBorder(BorderFactory.createLineBorder(newColor ,
1));The problem is that the titledborder is not updated
right away.Call repaint() or validate() on the component you've changed the border, if that does maybe this will do the trick.
Graphics g = getGraphics();
border.paintBorder(component, g, 0,0, component.getWidth(), component.getHeight());
wher component is the component with the new border.
lp

Similar Messages

  • I dropped my ipod in the toilet, I haven't fixed it for months. I didn't know you could put it in rice, or to not open it right away. Is it too late to fix it, or a place? The ipod is really important to me, it has been with me forever.

    I dropped my ipod in the toilet, I haven't fixed it for months. I didn't know you could put it in rice, or to not open it right away. Is it too late to fix it, or is there a place I could bring it to? I don't want to get a new one. The ipod is really important to me, it has been with me forever, and there is important stuff on it. 

    There are companies that specialize in data retrieval but it's costly (probably cheaper to buy a new iPod) and more than likely as Allan said, your circuits are probably damaged beyond all hope of retrieving anything. It's worth calling Apple you maybe able to get a discount or a refurbished iPod. Can't hurt to ask, Good luck. (And in the future... no texting in the john.) Sorry, couldn't resist it.

  • In Nautilus, mounted network shares not showing up right away

    I've noticed a strange problem recently (last couple of weeks) where my mounted network shares don't always show up right away in Nautilus (side bar or desktop- like they used to). For example, if I manually mount an NFS share in CL to /media/files it won't pop up in Nautilus right away like it used to. It will only show up after several minutes or if I plug in a thumb drive to trigger it to refresh. Also, when my computer is in suspend and I resume it, all predefined network share mounts in fstab that are indeed mounted won't be present in Nautilus upon resuming from suspend (they did before).
    I'm not sure where the problem lies as Nautilus or dbus haven't been upgraded in the repositories recently. I tried looking at recently updated packages but I can't pin it on one that would be causing the problem. I'd like to get an idea of what packages are affected before submitting a bug report. If anyone has any idea on the package I can downgrade no problem and test this further.

    Figured out the last filesystem upgrade from Decemeber is causing this. Bug posted- FS#27851.

  • My computer does not start up right away after I close the top... Is my hard drive going bad? Help please!

    I typically just close my computer when I'm done with it, instead of putting it to sleep or logging off. Recently, when I open it back up, it does not start right away. I have to press the power button half a dozen times before it starts. HELP!!

    annie1977-
    Greetings and welcome.
    Try booting from the system install CD/DVD by putting the disk in the drive and starting up while holding down the c key.
    After boot-up find the Disk Utility, either on the desktop or under the Apple menu. Select your startup drive and the repair permissions on that drive. See if that helps.
    Luck-
    -DaddyPaycheck

  • I just installed logic studio (academic version) and it will not open, quits right away, how can i fix this? running lion

    I am  having trouble with my newly installed logic studio ( academic version ). it will not open, quites immediately. any suggestions?

    Have a read here https://discussions.apple.com/message/15701309#15701309
    Seems that you have to update Logic to the latest version (9.0.15) to get it to work in Lion.
    Stefan

  • Selected value in LOV does not update the right item in multirecord block

    Hello,
    I am working on a form which is a multi-record form => 3 records. Each record has several items. The last item in these records is a LOV button which is part of the lov_item.
    Let me draw this situation:
    record 1 || item1 || item2 || item3 || lov_item || lov button
    record 2 || item1 || item2 || item3 || lov_item || lov button
    record 3 || item1 || item2 || item3 || lov_item || lov button
    This is the problem: my cursor is located on the third record. Right now, I am pressing the lov button on the first record. After selecting a value in the lov, Forms returns this value in the lov_item on the third record. This is not what I want. I would like to see the returned value in the lov_item on the first record.
    How can I establish this?
    We are using Oracle Designer 2.1 with Oracle Forms 5.0.6.16.0
    Best regards,
    Ronny

    Kevin,
    I tried your solution but this seems not workable. The cursor is still located in the record where it was.
    I also tried to use a message in the W-B-P trigger:
    message('record '||:system.mouse_record); to return the record number. It is always returning 0 as value. No mather what I try.

  • Texts not being delivered right away

    We just dropped AT&T because of their SLOW service and not having service in our house and went with Verizon. The only problem we are having is that our texts don't always get delivered in a timely manner. Such as today it took almost two hours for my husbands text to reach my phone and he's less than a mile away! This is very frustrating! What's going on and will this improve?

    In order to provide you with a resolution, we would need to troubleshoot this with you. If your issue has not already been corrected, a soft reset of your devices may resolve it for you. This is especially true if you normally leave your phones powered on most of the time. Below I have provided these steps. 
    Remove the battery while the phone is powered on (unless you have an iPhone)
    Wait 60 seconds and then re-attach the battery
    Power on and test the service again
    Please also make sure that your previous devices from the other carrier are powered down. 
    If you need additional assistance, please send me a private message including your name, your wireless number, and a good contact number for you. Upon receipt of your response, I can reach out to you by phone to troubleshoot further. 
    Thank you!

  • Max OSX10.10.3, Adobe acrobat/document cloud goes into "application not responding mode" right away. must force quit. cannot use the program. Why?

    Have never been able to get this application, adobe acrobat dc, to work on my mac. Constantly goes into "application not responding" mode. Happen to anyone else and know how to fix it?

    Hi Nicholas,
    Verify if Protected View and Enhanced Security are Off. Go to Acrobat-> Preferences -> Security (Enhanced):
    Also having too many fonts active can hurt the performance of any application.
    Try the step 10 of the KB: https://helpx.adobe.com/x-productkb/global/troubleshoot-fonts-mac-os-x.html
    Regards,
    Rave

  • Urgent: "Exit" in MainMenu Does Not Exit Application Right Away, Why?

    Hello All,
    We have many forms accessible from the MainMenu. I recently modified two forms (Form-a & Form-b) by using the CALL_FORM built-in in Form-b to call Form-a to allow users to return to Form-b with previous parameters and query search results. After the change implementation, all works okay except now our users sometimes have to hit the “EXIT” button in the MainMenu to exit the application more than several times(five times in one case I know of). The following is the PL/SQL code for “EXIT” in the MainMenu:
    BEGIN
      --check_update;
      IF :GLOBAL.SESSIONS > 1 THEN
        REMOVE_SESSION;
      END IF;
      DO_KEY('EXIT_FORM');
    END;Any thoughts/suggestions on this?
    Thanks in advance,
    Jinlan
    --

    hi
    try something like this.
    BEGIN
      --check_update;
    :global.sessions :=null;
      IF :GLOBAL.SESSIONS > 1 THEN
        logout;
      END IF;
    do_key(' exit_form'); -- you have to press F4 to exit
    END;If its Correct/Helpful please mark it. Thanks.
    Sarah
    Edited by: S@R@h on Nov 3, 2009 8:55 PM

  • Napster app will not open crashes right away, tried everything help!!

    Opens up for a second then shuts down. I've tried deleting it then reinstalling, deleting it doing a soft and hard boot then reinstalling it. I have done a factory reset then restoring my iPad, nothing helps!
    Anyone else know anyother tricks?
    Thanks!

    I have the same problem. Iphone 4 OS 4.3.3. Napster is the only app that does it, and I have tried everything under the sun as well. Restored the phone, deleted app and re downloaded it several times on both the computer and phone. rebooted phone in between every step. Basically every combination of things. Did you ever find a solution? Any help would be appreciated.

  • My daughter's ipod nano shows up in "devices" when I plug it in...but it disappears.  Right away it says it needs to update, but then after extracting the files it comes back and says that it can't be updated because it can't be unmounted.  help?!

    My daughter's ipod nano shows up in "devices" when I plug it in...but it disappears.  Right away it says it needs to update, but then after extracting the files it comes back and says that it can't be updated because it can't be unmounted.  help?!

    When in DFU mode and connected to the computer iTunes does not say anything but iTunes will see the iPod and you can restore the iPod via iTunes. When in recovery mode and you connect, iTunes will say it found an iPod in recovery mode.

  • Songs are not displayed right away

    upon inserting CD, song names/cd info does not show unless I click on advanced/get song names. My computer used to find all this info right away, but changed with the new itunes update. Any ideas?

    I have the ZenV Plus, 2 gb and it lists the songs by Artist, by Album, by Genre and then it has a complete alphabetical list of the songs by title (All tracks). Don't you have this option uner your "Music Library"

  • Why does a new episode of a already bought TV Show Season does not show up in my purchased section right away?

    Why does a new episode of a already bought TV show season does not show up in my purchased section right away? So I can watch it on my iPhone via Wi-Fi.

    Same problem here!!! It look like it is same problem everywhere!
    Updated Apple TV yesterday, purchased 4th episodes of Good Wife and after watching it dissapear! Wanted today to watch again, it is in the list but needed to buy again! After trying couple of time alternatives I buy it again and same thing happened!! If I want to watch again I need to buy it! Again!!
    First three episodes witch I buy under old operating system are there and there are no any problem with them!
    Did Apple start charging per view??
    It start to looking like Windows! Repair one thing but ruin 10 good other things with every update!!
    Does somebody have solution?. Thanks in advance!!

  • Firefox does not open right away

    A few hours ago, firefox would not open right away for me . i was attempting to go on the internet and mozilla firefox 3.6.12 would not open right away for me. i had to restart my computer. also, mozilla did crash before that when i attempted to go into yahoo to check out my e-mail.

    Try to boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.
    A possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls

  • Finder Locks up if not used right away

    Hi Everyone!
      On my 2.4GHz Intel Core 2 Duo 24" iMac running Mountain Lion, latest updates, I'm finding the following problems that I can't quite figure out and was hoping someone might have an idea:
    Start up very slow - at least 3-4 min.
    It takes a VERY long time to populate the finder windows.   If I open a finder window it's empty for about 30 sec. before it starts populating and even then it takes quite a bit of time for the icons to change from generic to their proper symbols
    Once it's up and running, if I start using it right away, it's fine.  But if I walk away and don't use the computer for a few minutes, the finder locks up.  The mouse pointer will move, and if a program is open windows can be closed, but nothing can be initiated.  If my browser is open (Chrome), eventually I get this page is unresponsive alert.  No functions, no new windows in any program.  And eventually the beach ball comes on.  I've tried to wait it out for as much as 30 min. without success.  Opening Force Quit and it's showing the Finder as unresponsive, but force quitting does nothing.  I have to manually shut down by using the power button.
    When I check the console for error messages, there are none.  Very few messages at all.
    I can upload more info when I get home tonight, but in the meantime, does this ring any bells for anyone?
    THANKS!

    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About

Maybe you are looking for