My manual repainting gets erased by SWING!

Greetings JAVA Guru's!
I am writing a JAVA APP that extends JFrame. My App has a menu bar that opens both a JDialog and a JFileChooser. My Problem is I need to use "Custom repainting" and I cannot get this to work right. This is the first time I have mixed a menu bar, Jdailog,and Jfile Choosers with "Custom repainting".
Swing already handles the painting for the Jmenu, Jdailog, Jfilechooser and I would like to manually update the remainder of the JFrame. Currently, I directly call PaintComponent(g) or Repaint() and my Image objects are drawn correctly on the JFrame (can be seen with rreeeaalllllyyy long delay). Except, Swing automatically updates the JFrame and erases all my "Custom Painting" once the delay ends.
Should I be calling Repaint() from the event Displatching thread? If so, how do I do this? How do I make this work without fighting against the Automatic Swing Painting Model?
Any Ideas or Suggestions will be greatly Appreciated!
-Chibi_neko

I call the paintComponent(g) Method as follows:
g=getGraphics();
paintComponent(g);
AND I override paintComponent as Follows:
public void paintComponent(Graphics g) {
if (tileSetImage !=null){
g.drawImage(tileSetImage, 0, 0, contentPane);
// My delay is below.... I pop up an Option Pain
JOptionPane.showMessageDialog(contentPane, "Repaint OK", "Repaint OK",OptionPane.PLAIN_MESSAGE);
}else{
JOptionPane.showMessageDialog(contentPane, "Error Repaint ", "Error Repaint",JOptionPane.ERROR_MESSAGE);
}

Similar Messages

  • Random songs keep getting erased by itunes

    i have the ipod 30 gb video. i have noticed that some of music radomally gets erased. for example, i purchased a cd named "trick trick the people versus" from itunes, well after a while my ipod still lists the songs but they dont play. what could be my problem? ps i have my settings on manual updating.
    thanks...

    What do you mean by "they don't play?" If you mean it sorta just skips them, then it's possible that the key file on the iPod has become corrupted. A Restore will fix this problem, but erase the iPod in the process.
    If you have not updated your iPod to the latest version of the iPod software, do so. Several bugs were fixed in older iPod firmwares that could cause this sort of corruption from time to time.

  • Data records in an IDoc getting erased, when conversion rules are defined

    Hello ,
    We are sending IDocs of message type GLMAST & COELEM from a system(version 4.7) to another system (version 4.6B).
    The segment data in the IDocs are changed using the user exit enhancement KKCD0001. The function exits used are EXIT_SAPFKCIM_001 and EXIT_SAPFKCIM_002.
    If there is no conversion rule defined in the receiver system, for the segments, the IDocs are posted correctly in the receiving system.  But if we define conversion rules , then the data records for all the segments for which conversion rule is defined are getting erased, and an error occurs during processing of IDocs
    Please let me know what can be the the reason behind this issue..And how to solve this..
    Thanks in advance,
    Afsar

    Issue solved

  • Help required network configuration - Gateway route settings get erased on reboot.

    Oracle Linux 7
    Linux myhostname 3.8.13-35.3.1.el7uek.x86_64 #2 SMP Wed Jun 25 15:27:43 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
    #cat /etc/sysconfig/network-scripts/ifcfg-eno16780032
    TYPE="Ethernet"
    BOOTPROTO="none"
    DEFROUTE="yes"
    IPV4_FAILURE_FATAL="no"
    IPV6INIT="yes"
    IPV6_AUTOCONF="yes"
    IPV6_DEFROUTE="yes"
    IPV6_FAILURE_FATAL="no"
    NAME="eno16780032"
    UUID="2d1107e3-8bd9-49b1-b726-701c56dc368b"
    ONBOOT="yes"
    IPADDR0="34.36.140.86"
    PREFIX0="22"
    GATEWAY0="34.36.143.254"
    DNS1="34.36.132.1"
    DNS2="34.34.132.1"
    DOMAIN="corp.halliburton.com"
    HWADDR="00:50:56:AC:3F:F9"
    IPV6_PEERDNS="yes"
    IPV6_PEERROUTES="yes"
    NM_CONTROLLED="no"
    #route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         34.36.143.254   0.0.0.0         UG    0      0        0 eno16780032
    34.36.140.0     0.0.0.0         255.255.252.0   U     0      0        0 eno16780032
    169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eno16780032
    When I reboot the machine, the first line in route table gets erased, I then run:
    #route add default gw 34.36.143.254
    After which network works fine.
    Help required. I don't want to use NetworkManager.

    The following might be useful:
    https://access.redhat.com/solutions/783533
    "When transitioning from NetworkManager to using the network initscript, the default gateway parameter in the interface's ifcfg file will be depicted as 'GATEWAY0'. In order for the ifcfg file to be compatible with the network initscript, this parameter must be renamed to 'GATEWAY'. This limitation will be addressed in an upcoming release of RHEL7."
    NetworkManager is now the default mechanism for RHEL 7. Personally I don't quite understand this, because as far as I can gather it is a program for systems to automatically detect and connect to known networks. I think such functionality can be useful when switching between wireless and wired networks, but for a server platform, I wonder.

  • If i update my iPhone 4S to latest version will the contacts gets erased?

    If i update my iPhone 4S to latest version will the contacts gets erased? I have not taken back-up of the contacts!
    I dont have an Outlook to take back-up. Is there any other means to back-up?

    Hi there,
    While the iOS updates aren't designed to erase your information, it is always a good idea to back up your information just in case the process doesn't go too smoothly. Take a look at the article below for information on how to back up your device to iTunes as well as some information on what gets backed up. I've also included an article that goes over how to update your device once you do have it backed up.
    iOS: How to back up
    http://support.apple.com/kb/ht1766
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    Hope that helps,
    Griff W.

  • Syncing Issues - playlists on Itouch getting erased

    I am still trying to get the hang of syncing. Sometimes I do it right and nothing that is already on my Itouch gets altered. However, lately, whenever I sync, my On-the-Go and Genius playlists get erased. It's weird because none of the other playlists that were already there, like ‘Recently Added’, get erased. It also deletes TV shows and movies. Unlike Recently Added, I always create my OtG and Genius playlists directly on the Itouch and not on Itunes. It's very frustrating because I just added about 100 more songs and I don't want to keep re-creating playlists every time I sync.
    Is this because my Itouch automatically syncs when Itunes opens? If so, how can I stop that. I always try to turn that off, but I must be doing something wrong because it still automatically syncs when Itunes opens. BUT…the confusing part is that to my knowledge, the Itouch always automatically synced in the past, and it never used to erase anything on the Itouch.
    Please help

    Right now, I tried deleting all of the music and resyncing it from my iTunes directly to my iTouch. Hopefully this will solve the problem.

  • If a photo or video get erased by mistake, is there a trash to find it?

    If a photo or video gets erased by mistake, is there a trash or way of retreiving it ?

    To add to what Chris suggested, you should also be importing your pics and videos to your PC http://support.apple.com/kb/HT4083

  • Player lists getting erased

    when ever i sync my ipod touch, the player lists i create in it are getting erased.
    Some one Please help me!!!

    Are contacts synced to a supported application on the computer or a cloud service?
    If a cloud service, do others use the same account for syncing their contacts?

  • My imessage isnt working due to the ios 7 update. I tried to reset the network settings etc. but it still isnt working. If i restore my iphone do all my text messages get erased??

    Can someone please help me. My imessage and Facetime arent working and also I am not able to send or receive texts. If i restore my iphone will my text messages and appointments in my calendar get erased???

    Go to settings, messages, turn iMessage off then back on. Make sure your phone number is selected for send and receive

  • HT201342 Can I get my old pic back the one get erased when I rest my phone

    Can I get my old pic back the one get erased when I rest my phone

    You can if it was in your camera roll when you last backed up to iCloud, but you will have to restore the entire backup to recover it (not just photos).  If you want to do this, it has to be done in the initial setup process.  If you have any data on your phone now that is not in the backup that you want to save you'll need to do that first.  Then go to Settings>General>Reset and tap Erase All Content and Settings.  You will then go through the setup screens as you did when the phone was new. When given the option, choose Restore from iCloud Backup (see image below).  Be sure you are connected to wifi and your charger as this will take some time to finish.

  • What data gets erased.?

    I have an iPod touch 5 and it is disabled to the for 23 million minutes!!!
    It was synced to the itunes I had before. But now I downloaded Itunes and now it is not synced anymore. Can I get access to my ipod without losing any videos or photos? If I do erase my ipod from icloud, do the pics and videos get erased too?
    Also, when I tried to restore it, it says to respond on my ipod but i have no access.... Pls help me by suggesting any way to not delete my pics and videos!!! Need your Help!!!

    maybe by:
    If you previously synced to the computer then you may be able to recover use of the iPod without erasing the iPod by following the instructions here:
    Disabled Recovery-must use syncing computer.
    Otherwise:
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:                                                             
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:           
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.
    You may be able to get some data from the restored/erased iPod by:
    How to perform iPad recovery for photos, videos
    Wondershare Dr.Fone for iOS: iPhone Data Recovery - Wondershare Official     
    http://www.amacsoft.com/ipod-data-recovery.html
    iPod recovery software to restore lost music files      
    http://www.pcrecoverytools.com/ipod-data-recovery.html
    -iPod touch Deleted Photo Recovery Tips You Should Know

  • Why does my music gets erased?

    My music continues to get erased. Why?

    tpd707 wrote:
    Here's my dilemma.  I have many songs, probaby 15,000 or so.  Some were purchased via cds, some were converted from windows media files (I have windows, not a mac) and some were downloaded from itunes. For years everything worked well.  And then I updated or tried to convert some old files from windows to itunes.  I'm not sure exactly what I did, but a day later, or when I rebooted my computer,
    By "rebooted" do you mean you powered off then back on (which is a reboot) or you formatted and reinstalled Windows and everything?

  • Why does my credit get erased after six months?

    why do my kredit get erased if i havn't made calls or send sms for 6 month?
    Post transferred from blog article;
    subject/title edited for clarity.

    Hi, Frank_Disa, and welcome to the Community,
    Please see this FAQ article for more information:
    https://support.skype.com/en/faq/FA10378/what-do-i-do-about-inactive-skype-credit
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Running Time Machine for the first time, how that I make sure that some information I have in the external drive does not get erase in the prosess

    Running Time Machine for the first time, how that I make sure that some information I have in the external drive does not get erase in the prosess

    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    Note: This is now your Library. It's not a Back Up, and you need another disk for backing up.
    Regards
    TD

  • When i restart/shut down settings get erased- calendar, bookmarks-gone

    when i restart or shutdown, my settings get erased and go back to default- blue screen instead of the picture i had as my background; dock preferences are back to default; my bookmarks are gone. my calendar is gone. things my apple used to remember (like certain words I would type often, etc) are all gone. I went through and deleted some stuff but I didn't think I touched anything that had to do with the system. is my hard drive crashing?

    Hi Miro, and a warm welcome to the forums!
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc that came with your computer, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it finishes.
    The usual reason why updates fail or mess things up, or things don't load/run, is if Permissions are not fixed before & after every update, with a reboot... you may get a partial update when the installer finds it doesn't have Permissions to change one obscure little part of the OS, leaving you with a mix of OS versions.
    Some people get away without Repairing Permissions for years, some for only days.
    If Permissions are wrong before applying an update, you could get mixed OS versions, if Directory is the slightest messed up, who knows!
    If many Permission are repaired, or any Directory errors are found, you may need to re-apply some the latest/biggest updates again, or even do an A&I if you have enough free disk space.
    The combo update for PowerPC-based Macs...
    http://www.apple.com/support/downloads/macosx10411comboupdateppc.html
    The combo update for Intel-based Macs...
    http://www.apple.com/support/downloads/macosx10411comboupdateintel.html
    Repair Permissions after re-install, then reboot again.
    If all the above do not resolve the problem, then it's time for an Archive & Install, which gives you a new OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space...
    http://docs.info.apple.com/article.html?artnum=107120
    We may need to recreate some plisys too, but report back after doing these things.

Maybe you are looking for

  • Want to pay off Verizon EDGE phone 100% and yet still can't get out of Agreement??

    My fiance was talked into getting on the EDGE plan and apparently not many employees know the rules behind the actual Agreement.  They told us originally he could get on the EDGE plan and when we were ready we could combine our accounts, I am not und

  • Zeen HP Gallery Display Photo Display Problem

    Is anyone else having problems with the display of photos on their Zeen from HP Gallery?  When I opened both the pre-loaded pictures and tried to view my own photos, the screen looks like a scene from The Matrix.  No photo comes up; just unintelligib

  • WCF Error: The remote server returned an error: Not Found

    I have a windows phone8 app that utilizes a azure WCF service. I added the Servicereference to my project,when i call the service method it executes fine but getting the following error after executing: System.ServiceModel.CommunicationException: The

  • PHONE TO TV

    How do you watch video from phone to tv. I used the IPOD cable , no luck. My cable plugs into the headphone jack and 3 outputs. Thanks

  • How can I change Time data with List Entry Screen ?

    Hi expert. I transfer Time Data (Infotype 2003) via CAT6. When I go to transaction PA61 and click List Entry icon. Record is display and cannot change data. If I wanna change data.I must to click Choose Icon one by one record. How can I change data w