Any way to repaint JTextField while Swing Thread still running?

while the AWT event-dispatch thread is running I would like to set a new value for a Text field and have the value of that field, as seen by the user, refresh to show the new value. I could use this technique, if it's possible, to make one of the fields in my window into a status field.
I know that this can be done by doing the processing in a thread other than the AWT thread, but I was hoping there is some way to get a field to redisplay its contents to the user while the AWT thread is running.

The paintImmediately() method may do what you want.
http://forum.java.sun.com/thread.jsp?forum=57&thread=234114

Similar Messages

  • I want to take an iPad 3 on a long trip. Is there any way to back up while I'm on the road?

    I want to take an iPad 3 on a 2-month trip. Is there any way to back up while I'm away from my home computer?

    Your own movies are backed up in the camera roll wich is backed up to iCloud. You should be able to restore the movies if something were to happen to them if you use iCloud for your backups. You would have to purchase more storage from iCloud, but the videos will be backed up
    You get 5GB of free iCloud storage for:
    Photos and videos in the Camera Roll
    Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
    App data
    Home screen and app organization
    Messages (iMessage, SMS, and MMS)
    Ringtones
    Read this
    http://support.apple.com/kb/HT4859

  • Is there any way to limit the number of Threads running in Application(JVM)

    Hello all,
    is there any way to limit the number of Threads running in Application(JVM)?
    how to ensure that only 100 Threads are running in an Application?
    Thanks
    Mohamed Javeed

    You should definitely use a thread pool for this. You can specify maximum number of threads that can be run. Be note that the thread pool will only limit the number of threads that are submitted to it. So donot call "Thread"s start() method to start thread on your own. Submit it to the pool. To know more, study about executor service and thread pool creation. Actually it will not be more than 20 line code for a class and you might need maximum of 2 such classes, one for threadPool and other one for rejection handler (if you want).
    Just choose the queue used carefully, you just have to pass it as a parameter to the pool.
    You should use "Bounded" queue for limiting threads, but also be careful in using queues like SynchronizedQueue as the queue will execute immediately the threads submitted to it if maximum number of threads have not been running. Otherwise it will reject it and you should use rejection handler. So if your pool has a synchronized queue of size 100, if you submit 101th thread, it will be rejected and is not executed.
    If you want some kind of waiting mechanism, use something like LinkedBlockingQueue. What this will do is even if you want 100 threads, you can specify the queue's size to be 1000, so that you can submit 1000 threads, only 100 will run at a time and the remaining will wait in the queue. They will be executed when each thread already executing will complete. Rejection occurs only when the queue oveflows.

  • Is there any way to clone a machine using boot camp running WinXP. The Mac side is running Snow Leopard. I want to clone a newly set up machine on to a number of machines in a student lab. I am wanting to clone both particians

    Is there any way to clone a machine using boot camp running WinXP. The Mac side is running Snow Leopard. I want to clone a newly set up machine on to a number of machines in a student lab. I am wanting to clone both particians

    AFAIK, there's no app that'll clone the Mac and PC volumes so you can restore them. System Image Utility.app or Deploy Studio for Mac and Ghost for PC are needed. See these for starters:
    http://clc.its.psu.edu/Labs/Mac/Resources/blastimageconfig/
    http://blog.macadmincorner.com/
    http://lists.apple.com/archives/System-imaging/

  • Is there any way to make my iPod Touch 4G to run faster? When I bought it, it was turbocharged! But now it seems to get a bit slower... Thanks in advance for any help

    Is there any way to make my iPod Touch 4G to run faster? When I bought it, it was turbocharged! But now it seems to get a bit slower... Thanks in advance for any help

    Periodically delete all apps from the recently-used bar (double clickHome button) and power off and then back on the iPod. With iOS 5, the iPod uses more memory (do not confuse with storage) and periodically you have to reclaim memory for use.

  • Concurrency exit, thread still running.

    Hi all,
    I am experimenting with Java SE 5 concurrency framework.
    import java.io.IOException;
    import java.util.concurrent.Callable;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.FutureTask;
    public class ConcurrencyDemo {
        /** Creates a new instance of ConcurrencyDemo */
        public ConcurrencyDemo() {
            FutureTask ft = new FutureTask<MyCallable>(new MyCallable());
            ExecutorService es = Executors.newSingleThreadScheduledExecutor();
            int i = 0;
            while(i++ < 10) {
                 es.submit(ft);
            //es.submit(ft);
            try {
                double d = ((Double)ft.get()).doubleValue();
                System.out.println(d);
            } catch(Exception e) {
                System.err.println(e);
            System.out.println(ft.isDone());
        class MyCallable implements Callable {
            public Double call() throws IOException {
                return Math.random();
        public static void main(String bicycle[]) {
             calleeMethod();
        private static void calleeMethod() {
             ConcurrencyDemo cd = new ConcurrencyDemo();
    }After executing the main in debug (in eclipse), i see two threads still running after F8,
    Thread [pool-1-thread-1] (Running)     
    Thread [DestroyJavaVM] (Running)
    Why the program is not exiting? Any idea?
    Thanks,
    Nirav

    I think the process (javaw.exe) should have been terminated but i see:
    ConcurrencyDemo [Java Application]     
         ConcurrencyDemo at localhost:4509     
              Thread [pool-1-thread-1] (Running)     
              Thread [DestroyJavaVM] (Running)     
         C:\Program Files\Java\jre1.5.0_01\bin\javaw.exe
    in debug pane in eclipse.

  • Will Robo Form work with any of you new browsers? I am still running FF 3.6 and will only upgrade if RF works.

    Will Robo Form work with any of you new browsers? I am still running FF 3.6 and will only upgrade if RF works. I tried the browse after 3.62 and it did not support Robo form so I uninstalled it

    Hi there! Actually, Roboform works with modern versions of Firefox. Please update to Roboform 7.9.0, and update Firefox to version 22 immediately. Continuing to use Firefox 3.6 is leaving your computer at risk for MAJOR security holes, plus known stability and performance issues. Please update immediately.
    Also, Firefox will work perfectly fine with XP SP2, but there is no reason why you shouldn't update XP to SP3

  • Is there any way to cut audio while keeping the video it is tied to?

    ok, I have a video from a dvd i burned on FCE but the sound is messed up. I am going to be making a AMV with it anyway so I don't really need the audio. Is there any way of cutting the audio without disturbing the video it was imported with. I must stress that they were not imported separately.

    Place the footage in the timeline. Click the lock key on the vidoe time line. This will place a screen looking thing over the video. Select the audio in the time line and press delete. That will delete the audio but keep the video. Then unclick the lock key and all should be well. Always remeber the "undo" option if you mess up. I use it all the time.
    Message was edited by: vidoedude

  • Any way to stop syncing while retaining files on Apple TV?

    OK, I'm getting really frustrated with this; hopefully someone here has an answer. . .
    I don't want my TV shows to sync to my computer. I want them to stay on the Apple TV HD. I don't need a copy. I don't care about backing them up. I just want them to stay on the Apple TV HD until I've watched them and eventually I'll delete them. I don't need them to clutter up my computer's HD or to slow down my wireless constantly transferring large files back and forth. Is there any way to achieve this?
    I know completely disconnecting the Apple TV and my computer would work, but I still want to be able to stream my music. . .
    This is very frustrating. The only reason I got the 140gb drive model is so I'd have room on my apple tv and wouldn't have to take up room on my computer. Now I'm taking up room on both plus slowing down my wireless. Any suggestions? Thanks much.

    jarrehas wrote:
    That sounds like what I want to do is impossible. What's this deal with a secondary/streaming library?
    What you can do is in Settings=>Computers...disassociate your computer thus not sync. Then reset it up to be a streaming only machine.
    Thus all content in your library can stream and any content you buy via the AppleTV will stay on the AppleTV (note, you won't get a copy for backup and if AppleTV fails, will lose what is on it).
    His other stuff about external drive is, for the most part people DO want to keep what they buy. Thus since the AppleTV is NOT a backup device it wants to sync data to your library and for most (such as myself) an external drive (like the 1TB one I have) is where I store my iTunes library thus what gets synced back to my computer gets synced to my external drive, not my computers HD.

  • Is there any way to delete songs from iTunes and still have them on my iPod

    I'm trying to free up some space on my computer by deleting some songs off of iTunes. Is there any way that I can delete songs off of iTunes but still be able to have them on my iPod when I connect it to my computer? Thanks.

    Hey there,
    In order to make this possible, you have to set your iPod up to manually manage music and videos. This method can be very risky and you increase your risk of losing all your music if your iPod dies. I would recommend investing in an external hard drive to keep your music on.
    For more help instructions on how to accomplish this, I would check out this older thread. Hope it helps.
    http://discussions.apple.com/thread.jspa?threadID=1459917
    B-rock

  • My phone's screen is smashed, I can't open the passcode and my wifi is turned off. Is there any way I can back up my iCloud still?

    I took a bunch of photos over the weekend before my phone got crushed. My iCloud hasn't backed up anything since before the weekend. My phone still turns on and charges, but the screen is completely smashed out so I can't enter my passcode to upload anything to itunes. My wifi connection is turned off as well. Is there any way that I can get the photos backed up to the iCloud before I restore everything onto my new phone?

    There must be something amiss here. Your Camera Roll would only have everything up to the last backup, but Photo Stream should be current. From the iCloud Troubleshooting Support article:
    Photos and videos in your Camera Roll are included in your iCloud backup and  will download to your iOS device during the restore process.
    Photos in your Photo Stream are already stored in iCloud, so they are not part of your backup. iCloud stores the photos uploaded to My Photo Stream  for 30 days. To keep the photos in your photo streams on your device and make them part of your  backups, save these photos to your Camera Roll  or another album.
    To view   My Photo Stream or a shared photo stream,   make sure the photo stream features are  turned on in Settings > Photos & Camera.
    To recover photos that originally synced to your device from your computer, sync your device using iTunes on a computer.
    To restore Camera Roll photos to an iPhone or iPod touch, the iCloud backup must be from an iPhone or iPod touch. To restore Camera Roll photos to an iPad, the iCloud backup must be from an iPad.
    Your device needs to be connected to Wifi to get the entire Photo Stream pushed back to it, and it can take some time. But there is no reason why those later photos should not be in your Photo Stream, if you were signed onto the same iCloud account when you were taking those photos, and if you had Photo Stream turned on....
    Not sure what might be going on....
    GB

  • Is there any way to know whether a report server is running in solaris

    Hi
    Could you please tell me is there any wat to know whether a report server is running in solaris or not?
    And if running what is the name of the Report server?
    Thanks

    On windows, you can read the environment-variable "OS" with the following code. Maybe there is somethins similar on Solaris.
    function BeforeReport return boolean is
      vcOs VARCHAR2(2000);
    begin
      tool_env.getvar('OS', vcOs);
      srw.message(1,vcOs);
      return (TRUE);
    end;

  • I just highlighted and changed the artist name of about a hundred songs in my library.  This was an accident and I want to change them back. I can't "undo" or search for artists' names online. Any way to fix this? They are still highlighted.

    These were all songs I had ripped from old CDs, lot of which, I no longer have. I can't remember that artists' names for all these songs.  They are all "oldies" from the fifties and I just accidentally changed the artist for all them to Fats Domino. I'd had them all highlighted because I had done a batch change of their genre to Oldies. I couldn't tell that they were all still highlighted after that change because I could only see two of the songs at the time that I changed the artist name.  Is there any possible way to undo this?  All the tracks are still highlighted from the naming operation. I can't search for the artists' names online because I didn't purchase them from iTunes.  Any suggestions would be greatly appreciated.  Thanks!

    I found one other way to do it.  I just deleted them all out of my iTunes library. Now I can re-import them from Window's My Music file with the original artists' names intact.
    Thanks for your help, Matt!

  • Is there any way to minimize/hide games when they're running full screen?

    so i'm a seasoned mac user, but i've always wanted to be able to do this, i've tried virtuedesktops to try and switch screens, but whatever i do, i have to quit the game if i want to change something on my desktop. that, or run it in a window, which kinda s u c k s. i know in windows you can minimize anything by hitting the window key. things like apple-tab don't work either. there must be some way to do this!

    That seems to depend on the game. Certain games seem to disable your ability to switch tasks. But what you could try is to induce the Force Quit (command-option-escape) dialog. If my experience serves correct, this seems to override whatever wants to prevent multi-tasking.

  • My ipod has recently gone missing. Any way I can find the serial number still?

    Apple asks for my serial number to help with support for my ipod. Except I cannot get my serial number, because I cannot locate my ipod.

    Change your iTunes (Apple ID) password along with any other password that was stored in the iPod.  If any passwords are associated with credit cards, contact the CC company and get your card replaced (with a new number).  If any passwords are associated with your bank or any savings institution, contact them also and discuss approprate action with them.
    The "Find my..." function is pretty much useless if the device is in the hands of a thief.  All that is necessary is for the thief to connect to any computer with iTunes and "Restore as new."
    The only real protection you have is with the personal information on the device rather than the physical device itself.  This requires action before the device is lost/stolen.  If the device has significant personal information, it should have a strong 8-digit (or longer) password AND be configured for automatic wipe in the event of ten consecutive incorrect password entries.

Maybe you are looking for

  • Time to upgrade. Don't know what to do.

    So, after years of abuse, it seems like my old trusted MacBook (late 2008) has given up on living and it's time to find a replacement. I went to an Apple store and asked about the MacBook Air and the MacBook Pro retina, both 13 inch screens. When I e

  • DateFormatSymbols returns wrong strings

    Hi all !! I have a problem with DateFormatSymbols. The following code: Locale locale = Locale.getDefault() // returns es_ES DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale); dayNames = dateFormatSymbols.getShortWeekdays(); and dayN

  • Vendor cleanup

    Hello, We are trying to clean up our vendors in preparation for the next phase of our project.  Does anyone know if there's a standard report you can run that analyzes if a vendor has had postings, checks paid, open POs, open invoices, all in one tra

  • Bex Query showing incorrect data

    Hi Experts, I have a Bex query on an infoset. The infoset is based on Sales Order Line Item DSO and Sales Order Condition DSO. I am refering Net value from Sales Order Line Item DSO. In the query, the values of Net Value is not coming correctly. When

  • STO - both plants need to be in APO

    Hi, I am trying to deliver a STO from an APO plant to non-APO plant and I get error " Order does not exitst' while creating delivery in VL10G. Do we need to have both the plants in APO for STO? thanks, Vinay p.s.: Points assured