In this case, can I modify swing GUI out of swing thread?

I know the Swing single thread rule and design (Swing is not thread safe).
For time-consuming task, we are using other thread to do the task and
we use SwingUtilities.invokeAndWait() or SwingUtilities.invokeLater (or SwingWorker) to update Swing GUI.
My problem is, my time-consuming task is related to Swing GUI stuff
(like set expanded state of a huge tree, walk through entire tree... etc), not the classic DB task.
So my time-consuming Swing task must executed on Swing thread, but it will block the GUI responsivity.
I solve this problem by show up a modal waiting dialog to ask user to wait and
also allow user to cancel the task.
Then I create an other thread (no event-dispatch thread) to do my Swing time-consuming tasks.
Since the modal dialog (do nothing just allow user to cancel) is a thread spawn by
Swing event-dispatch thread and block the Swing dispatch-thread until dialog close.
So my thread can modify Swing GUI stuff safely since there are no any concurrent access problem.
In this case, I broke the Swing's suggestion, modify Swing stuff out of Swing event-dispatch thread.
But as I said, there are no concurrent access, so I am safe.
Am I right? Are you agree? Do you have other better idea?
Thanks for your help.

If you drag your modal dialog around in front of the background UI, then there is concurrent access: paint requests in your main window as the foreground window moves around.

Similar Messages

  • Can't modify a gui Status

    I made a GUI and i try to change it.I take the message that you see.What can i do ?
    I can't copy also a gui from SAPLKKBL to my prog .....
    Copying statuses is restricted in modification
    mode. See F1 Help
    Please help .....
    Point will be reward ..

    Hi Dimath72,
      Just try switching off the modification assistant from the GUI status. take the following Menu path:
    Edit -> Modification Operations -> Swich off assistant
    This should resolve the issue.
    Cheers,
    ~i1

  • How can I modify memory limitation to a Java thread?

    While I using
    java -Xms64M xxxx (class name)
    it seems that 64M is the biggest memory capacity Jvm allows.
    How if i wish to use more than 64M ?
    Ps: I am using Windows XP
    Thanks

    -Xms is the starting size. Try -Xmx to set the maximum size.

  • Why Does Disk Utility Say "This Partition Can Not Be Modified"

    I've got an external drive with three partitions. I want to expand the first partition. (It's a backup of my internal drive and it isn't big enough anymore.)
    All partitions are Journaled. All verify okay. The disk's partition map is GUID.
    Disk utility will change the size of the 2nd and 3rd partition, but when I click on the first partition, the one I want to expand, it says "This partition can not be modified."
    I've tried making another partition smaller, but that doesn't help.
    Does anyone know why? Or what I can do about it? (Can I delete that partition, make another one smaller and then create a new bigger one?)
    Many thanks in advance.
    Steve

    Thanks, guys.
    I ended up taking one of the existing partitions, making it smaller and then adding a partition of the size I needed -- created out of the space freed up. I also erased the original partition that I couldn't change and Disk Utility now says I can make it smaller, but not bigger.
    Bottom line in my case -- all partitions except the first could be made smaller. But none could be made larger. (Maybe the first one couldn't be made smaller because it was full?). That caveat -- 'you can make 'em smaller but not larger' -- is not mentioned in the help file, but that's what I saw.
    Make sense?
    Thanks again,
    Steve

  • ICloud ruined my life- how can I escalate this case further!!!

    The unthinkable has been hande to me by Apple.
    iCloud corrupted 40% of my documents. Then 'reset' the remaining 60%
    100% of my documents erased by Apple. This has taken 8 months of my life away, the apple care process has been woeful. So many Senior Advisors said they would 'take ownership of the case' and 'call me back'. Nothing, no call back- I am forced to call up again- explain the case again- be promised again by another Senior Advisor that they would 'take ownership of the case' and 'call me back'...
    I am left shattered.
    This was a few months ago- i have lost huge amounts of irreplaceable research generated from over 2000 hours of my own personal work.
    It was not backed up to my mac book as it was rendered inoperable when i 'upgraded' to OSX Lion.
    I did all my work for 8 months on my ipad. All documents were created and stored locally on my ipad. I had no access to my LaCie external because my macbook was inoperable.
    It was recommended by Apple Genius that I turn on icloud for Documents. iCloud then corrupted the documents and synced that corruption back to my documents locally stored on my ipad.
    I could then see all the images in pages documents view. But could not open them- that was for about 40%of my documents. I could still access the other 60%
    My account was then referred to the iCloud engineers. After a few weeks with no contact from apple I called up to chase up this loss of my documents- it had been going on for 7 weeks at this point.
    The senior advisor told me that my account had been 'reset' and should be working fine now..
    WHAT!!!! Reset!!!?????? so what about the 60% of docs that i had access to?
    Gone. Deleted from the icloud account, synced back to my ipad.
    All Gone.\
    If i had been contacted by the engineers. 'We cannot fix your corrupted documents. We propose to reset your account. That will erase all data and documents in your account. Is this ok? Please backup any documents you have on your ipad.'
    This would have saved 60% of my 8 months research- which is a lot.
    but no- no contact, just reset my account and erased my documents.
    its unbelieveable and unthinkable.
    I am a MASSIVE apple fan- i have 22 Apple devices and tell everyone in my network that all my dreams have come true with Apple- ridiculing them for using other devices. It has now turned into a nightmare.
    I WENT TO THE APPLE STORE IN SYDNEY IN DESPARATION- TO FIND OUT IF THERE WAS AN IMAGE OF THE DOCUMENTS SOMEWHERE/ANYWHERE!!! I KNOW THEY CAN ONLY CONTACT ICLOUD IN THE SAME WAY AS ME- BUT WHAT OPTIONS DID I HAVE- I COULDN'T ESCALATE THROUGH APPLE ANY HIGHER- THEY TOLD ME THAT THE SENIOR ADVISORS AND ENGINEERS WERE AS HIGH AS I COULD ESCALATE. SO I WENT TO THE APPLE STORE AND TOLD THEM THAT I WOULD NOT LEAVE THE STORE UNTIL IT WAS RESOLVED- THEY TOLD ME THEY COULDN'T HELP ME- I STAYED FOR 8 HOURS- AFTER 1.5 HOURS WE FOUDN OUT THAT THE ENGINEERS LIKENED TRYING TO RESTORE MY DOCUMENTS TO TRYING TO REBUILD A BURNT DOWN HOUSE.
    We were about to release our energy saving App globally. I had a meltdown and just went away on holiday to New Zealand and Thailand with my kids- I couldn't face the reality of what i had to do to recover.
    I came back to try and get back on track recently. My only way forward was to forget about it and start again.
    AND THEN!!!
    I stupidly used pages on my ipad to edit a document from our development partner the other day. I opened my pages today, the document was there- then in front of my eyes all the documents shuffled around. Guess what- the doc I had edited disappeared.. In shock i called Apple Support. He asked me to check on icloud. com. 15 documents, not the one i want, advisor can see my doc- i cannot. I feel naseous.
    THIS CASE HAD ALREADY GONE TOO FAR. BUT NOW I HAVE HAD ENOUGH!!!!!!
    How can i escalate further? There must be a way. This is not acceptable! Apple are messing with my life!!!!! I'm losing too much time and money- it's just not fair at all. Something MUST be done by way of compensatiing for this series of errors!!!!

    There's nothing anyone here can do for you, and I'm afraid I have little sympathy.
    2000 hours of "irreplaceable work" and at no point during those 8 months did you think "Gee, I really should back up all these hugely important files just in case my iPad gets stolen, lost, breaks or some other disaster occurs"?
    As soon as you noticed something was amiss, or even at the point when you still had access to 60% of your documents, why did you not take the opportunity to download a copy of them via iCloud.com (on any computer) and save them safely on a memory stick or other backup device?
    Having just one copy of any file is asking for trouble. Backing up regularly is the No.1 rule of computing. Apple is not responsible for your lack of any backup routine. Apple advise you to backup regularly. Being able to backup your iPad should've been your motivation for spending an hour or two of those 2000 getting the MacBook up and running.

  • I've moved my Aperture library to another computer, and masters are referencing an old path name.  How can I update these references?  Reloctating masters does not work in this case :(

    I've moved my Aperture library from one computer to another using Finder.
    I merged the library with one which was already on the computer.
    Now, the photos I imported have reference to the old path name on my old computer.
    How can I update these references as "Relocate Masters" does not work in this case?

    Just one suggestion to be able to reconnect all at once:
    Create a smart album containing the images with missing masters:
    File -> New ->  Smart Album,     and add a rule: File Status is "Missing"     (or File Status is "offline")
    Then select the images in this album and go to the File menu:
    and select:   File -> Locate referenced File
    If you are lucky, Aperture will reconnect all at once, if you point the first image version to its counterpart.

  • My authorization is to buy in an itunes USA store, but how can i buy an album from an itunes store of another country (this case Brazil)?

    my authorization is to buy in an itunes USA store (per the message that pops up on my iPhone 4), but how can i buy an album (using either my iPhone 4 or MacBook Pro) from an itunes store of another country (this case Brazil)?

    You cannot use other countries itunes stores.
    Sorry

  • Can I replace my current iPhone 5s with a new one in this case?

    I just got my iPhone 5s two days ago, but it already has problems when I was trying to text with it while charging. The phone was doing all these random things like mis-sensed my typing really badly, jumping out to the main screen and even called the person I was texting. I even tried typing messages in Whatsapp, it constantly hides the keyboard from time to time and that's really irritating. While it's on lock screen, I could not slide to unlock it, I had to use my finger scan to access my phone in the end. The phone went normal again once I got the charge unplugged, but it went crazy again once I got it plugged in. I truely believe it's something wrong with the phone rather than the charger. Can I replace my current phone with a new one in this case?

    Take it back. This is a warranty/purchase issue. We are just users here.

  • IPod touch 1st generation could not be restore on iTunes, an unknown error occurred (1). how can i fixed this case?

    My iPod touch 1st generation could not be restore on iTunes, the message was "The iPod "iPod" could not be restore. an unknown error occurred (1)".
    my serial number is AB1905714N
    how can i fixed this case?
    thank you

    ERROR (1)
    - Place the iPod in DFU mode and then restore
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - Try on another computer
    - Try another cable           
    - Also, confirm your security software and settings are allowing communication between your device and update servers.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar     

  • 'Unable to connect' the number of free accounts can be enabled on this case has been reached

    hello ! please someone help me
    when i sign in icould ...'Unable to connect' the number of free accounts can be enabled on this case has been reached' heelp please

    hello ! please someone help me
    when i sign in icould ...'Unable to connect' the number of free accounts can be enabled on this case has been reached' heelp please
    iPhone 5s, iOS 7.1.1 

  • HT201441 hi freinds i bought a 4g iphone second-hand i earsed the phone but now when i open it requsting an email and password of the privous owner to be active what can i do in this case i don't now the the iphone's owner please help

    hi freinds i bought a 4g iphone second-hand i earsed the phone but now when i open it requsting an email and password of the privous owner to be active what can i do in this case i don't now the the iphone's owner please help

    Then there's nothing you can do.  Only the previous owner can help you.  They must either provide the ID and password, or erase the phone and remove it from their account as explained in the article you were reading.  There's no way around this.

  • Disk Utility says of USB Drive - "This partition can't be modified" "This disk is not writeable and cannot be partitioned"

    Several months ago I bought a 64GB PNY USB memory stick to transpord data quickly.
    It seemed to work fine.  I could format it as a Mac partition and use it.  I hardly ever need
    it so I just put it away.
    Today I wanted to use it to put a file on and take it to the Kinko's/FedEx to print, and I
    find I cannot mount it on any of my computers, iMac, MacMini or MacBookPro.
    In Disk Utility virtually everything is greyed out.
    Disk Utility says: "This partition can't be modified" "This disk is not writeable and cannot be partitioned"
    If I try to mount it, it says "This disk cannot be mounted"
    There is no physical read-only switch or setting on the disk that I can see and it is very small.
    I has a Mac OS installed on it, so I wonder if that is a problem?  I should be able to write over that
    or reformat it I would think.

    Thanks for these replies. 
    I've got regular time machine backups and just backed up some of my data by copying some key folders to an external drive.  I'm bit paranoid about backup integrity and would ideally like to do another full backup to a different drive using a system other than time machine, in the event that something goes wrong with the time machine backup.  Any recommendations on good and affordable backup software to do a backup of my TM backup?
    One other question: I seem to encounter problems like this pretty frequently.  I'd say once a year or so, my drive fails completely or gets near enough to failing that I have to wipe and restore.  (I've never had a TM backup fail to work, though the last go around there were some hiccups which has led to my backup paranoia.)  I've had this happen on multiple computers, so I'm becoming pretty convinced that the problem lies somewhere in my data.  Is it possible (even likely) that there's something in my data causing this recurring problem?  If so, is there anything I might be able to do to try and pinpoint and address this problem?  I'd love to go one year without having to wipe/restore my machine!
    For a while I thought I just had bad luck.  But I think this is like the 4th or 5th time this has happened in the past 4 years and every time, I'm restoring from a backup, so I come back with the same data.  It's the one constant since I've had 3 different machines over this same time period. 

  • HT4824 My iPhone is running with ios 4.2.1 & current version of ios is 6.0.1 in this case how can i update my iPhone to ios 4.3.5? itune will show only latest version of ios.

    My iPhone is running with ios 4.2.1 & current version of ios is 6.0.1 in this case how can i update my iPhone to ios 4.3.5? itune will show only latest version of ios.

    If you have iPhone 3G, the latest and greatest is IOS 4.2.1.
    If you have iPhone 3GS or later, you can only update to IOS 6.0.1.
    For iPhone 5 and iPad mini, you can update to IOS 6.0.2.

  • Framemaker uses $filename for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen?

    Framemaker uses <$filename> for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen? In compiling our books it would be helpful to not have this extension appear as it then requires us to create extra files without them.

    See: System Variables

  • Hello every body .. my ipad blocked with icloud and i dont remember the email or even birthday i've wrote I just remember the security question ... what can i do in this case to restor my email working ?? thx

    hello every body .. my ipad blocked with icloud and i dont remember the email or even birthday i've wrote I just remember the security questions ... what can i do in this case to restor my email back ?? thx

    Do you mean that the iPad is on the activation screen ? If it is then does it not show the first letter of your email address and the provider e.g. similar to :
    If that is what you are seeing then you don't remember any email account that you had starting with that letter with that provider ? If not then do you know if you have any of the account's downloads in your computer's iTunes library : Recovering a forgotten iTunes Store account name ?
    Or see if you can find it via http://appleid.apple.com : Apple ID: How to find your Apple ID
    If you cant remember or find your id then you won't be able to use your iPad

Maybe you are looking for

  • DBMS_DATAPUMP; how to get the log file of a job?

    Hi I want the user to be able to see the logfile of his job from another session. this is my procedure create or replace procedure get_job_log (p_job_name IN varchar2 ) is hdl_job  number; l_job_state     VARCHAR2 (20); l_status        sys.ku$_Status

  • Is it possible to transfer the data from a SharePoint 2013 calendar entry to Outlook 2010 calendar entry?

    Hi, I've managed to Sync my SharePoint Calendar with my Outlook. At the moment it only transfers through the Title and Location of my calendar entry. Is it possible to transfer the description as per the SharePoint entry so it shows up in Outlook? Th

  • Calling an EJB throws an UNKNOWN exception

    Hi EJB experts! I`m trying to call an EJB on OAS from Java application running within a JDeveloper. After several calls of remote method the application invokes the remote method again but exception java.rmi.UnexpectedException: CORBA: org.omg.CORBA.

  • Best approach to use with OTT

    Hi We have a application (c code) that currently uses a ISAM file based DB. We want to replace this with Oracle9i. My thoughts would be to create Oracle OBJECTS data types and use the OTT utility to automaticaly create the associated c structs. We co

  • PHP/Spry Tabs/Pagination

    Hello all, I have a results page which contains tabs for separate query results from multiple DBs on one page.  I would like to include record set paging for each record set under each tab.  When I select a different tab, click on "Next" in the pagin