Problem visualizing a JFrame while doing other things

I'm triing to visualize a "Waiting" Window with static labels on it saying "Wait please, this process can take some time..." while doing something like 20000 insert in a database, but the window shows only at the end of the process (when i have to open another window, so it displays for only a millisecond). How can i solve the problem? Code is like this:
public class myclass extends JFrame {
// some dichiaration
public myclass() {
try{
jbinit()
} catch ...
// do alot of calculation
private void jbinit() {
// all the stuff like setsize and labels definition
}

You're probably doing the entire work in the Swing thread and block it from doing anything else.
http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

Similar Messages

  • Playing video while doing other things

    Hi there,
    I have a (simple?) problem. I have two screen and I want to play Itunes video on one (which I can do) and then work on the other. The problem is, if I choose another application, the video closes down. Any ideas on how to fix this? Thank you!
    -- Adam

    It won't let me post my vi so I put it here with the wav file I'm using.
    http://acoustics.auc.dk/~jg/labview/
    This simplified version plays the sound and displays the first number,
    then it waits til the wav has finished before displaying the remaining
    numbers. I am using a different dataflow for the wavplay and for the
    numbers loop, as far as I can see - is this the best way to do it?
    cktears wrote:
    >
    > I wonder what code did you use to display digits that cannot run
    > simultaneously with SndPlayWaveFile. Normally you may run other stuff
    > while playing sound by setting "Wait Till Finish" as long as you use
    > different dataflow (or thread) with the sound one. Maybe you can post
    > your code here.
    >
    > If your code doesn't allow you to simultaneously ru
    n both, you may
    > have to use WIN API to poke the status of the Sound device and display
    > the keypad after the sound device stops. I know the function
    > sndPlaySound() can do this.
    >
    > Hope this can give you some clue.
    Jody Ghani
    Research assistant Email: [email protected]
    Sound Quality Research Unit Phone: (+45) 9635 7509
    Department of Acoustics Fax: (+45) 9815 2144
    Aalborg University
    Fredrik Bajers Vej 7-B5 http://www.soundquality.dk
    DK-9220 Aalborg Øst http://www.acoustics.auc.dk

  • AIM/Yahoo, ect How to receive messages when doing other things....

    I downloaded the AIM and Yahoo Apps and even tried the new Palringo App, but all of them seem to disconnect when I leave the program and go back to the home screen and reconnect when I go back.
    People say It doesnt seem to log me out, however I dont receive any notification of messages when I am doing other things, not like I would if I receive a text message,
    Any way to fix this and get messages without going back to check in the program?

    Apps cannot run in the background. AIM keeps you logged in for ~5 minutes after you exit the app, but you'd need to go back to the AIM app to get any IMs.
    In your AOL settings (accessed through your browser) you can set it to send you an SMS when you get an IM.

  • Can your DAQ cards do TRUE async buffered daq while Labview does other things?

    I need to perform analysis on and save aquired data while the DAQ card is simulataneously and independently performing another scan session, initiated by an external trigger. I've found what look to be virtual or pseudo asynchronous buffered daq functions, but is the 6034-E or any other DAQ card capable of true async buffered aquisition via DMA while Labview is executing other things separately?

    testy,
    Yes, you can acquire, analyze, and save data simultaneously. There are examples that illustrate this that ship with LabVIEW (Help > Find Examples). Any buffered data acquisition is capable of this. Once the buffered acquisition is setup it is going to continue to sample the channels specified and put the data into memory via DMA (if available). Inside the while loop of your program you will do a read which reads some data from memory and brings it into LabVIEW's memory. So if in this while loop you also do some analysis and stream to disk that isn't a problem as long as you call your read function fast enough that your buffer doesn't overflow (the buffer that your DAQ card is shoveling the DMA transferred data into). All of our DAQ boards use DMA (if a
    vailable) by default for data transfer.
    Ames
    Applications Engineering
    National Instruments

  • Doing Other Things While iDVD is Rending

    Hi,
    Is it true that "while iDVD is processing the munu, slideshow, and films, do not do other things on your iMac."
    The reason is that if you do other things while iDVD is processing, the film will not be smooth.
    Thanks.

    Hi JhnD
    Welcome to apple discussions. For the most part this is not true. I work daily on other apps while iDvd is burning to disc or encoding my dvd without ill affects. Nevertheless it is recommended not to run multiple apps with slower clock speeds /CPU while burning a dvd to avoid possible errors or even a crash due to CPU overload. Just use reasonable caution and monitor all activity on the activity monitor within your utilities folder. If you notice a spike in usage of the CPU above 90% then it may be time to start quitting other apps other than iDvd and allow it to finish encoding on its own without any interruptions.
    Or a better suggestion .... allow iDvd to do it's thing overnight (if it happens to be a longer project).
    Message was edited by: SDMacuser

  • How do I stop obnoxious search engines from comandeering my computer (unwanted) while I am doing other things?

    I can be in the middle of playing games on Facebook and Pogo or even trying to update my banking and paying bills and I will get another window open with a search engine that I have no clue as to who they are or how they got there. This is very obnoxious and unwanted. I want this to stop. How can I do that? I run my security on a daily basis as well as on start up and during use, so I am not sure what to do, it's not showing as a virus.

    Yes, that sounded indeed like a daft question, but as it seems changing the batteries did actually solve the puzzle. I am baffled by this, as the batteries claimed to be at 40% and shouldn't need to be changed. But I changed them after reading your reply, and the problem stopped. Now, one week and a couple of days later, the problem still has not reoccurred.
    For one reason or another, once batteries drop under a certain level of power, the keyboard connection will start acting up. I feel a bit silly, should have checked that bit myself before posting my question, but I'm glad this solved my problem. Thank you ajduguid.

  • Problem in Refurbishment processing while doing GR.

    Dear experts,
    I'm working on refurbishment processing.
    I have done all the steps as below:
    I have a material for equipment for which I have 3 valuation types:
    C1 - New items
    C2 - Repaired Items
    C3 - Damaged Items.
    1. Equipment creation with serial number allocating the valuation type C1 installed at a F/L
    2. I have 2 no.s of the same in stock with the valuation type C1.
    Now I got a problem with equipment which is installed and needs to send it to the vendor for repair.
    I have changed the valuation type to C3 of the equipment in serial number data, and dismantled using t code IE4N with movement type 202.
    After that I have issued one material (equipment) from stock to the same cost center and then went to change mode of the equipment (IE02) in structure tab I have mentioned the F/L.
    Now I have created a Refurbishment order for the damaged equipment, mentioning from valuation C3 to valuation C2 in the order.
    I have mentioned the Service number, qyt and price in the External screen of the Operations tab. Released the order. I got PR. (I have mentioned only services for the PR, no materials)
    I have created the PO w.r.t the PR from the refurbishment order.
    After that the vendor has completed the services and returned the material (equipment), for tha I'm following the GR w.r.t refurbishment order i.e, IW8W.
    I have entered the Order number then enter.
    There in the new screen it shows,
    Change charge / valuation type+Post GR. this is having tick bydefualt.
    Posting date: 28.05.2009
    Document date28.05.2009
    Valuation type C2 in gray mode
    Plant 1250 in gray mode
    stor. location 1040 optinal entry
    Then I have ticed the box for Deliv. Compl
    Here I am not finding the material nuber or serial number.
    In the bottom of the screen it shhows the header
    Serila number        Material number       Materaildoc number    Batch/Valuation Type
    The headers are showing but no data under the header.
    While saving the document it gives error message as below:
    Select serial numbers
    Message no. CMFU106
    But there is no data of serial number to select.
    I have tried the same in IDES, there it is showing only Material numbe no serial number, but allowing to save the document. (the screen is bit different that of Devl. server, in IDES the header as I mentioned above is not appearing, just below the order number the Material number is displaying.)
    Can any one please help me in solving this error message?
    I am following the steps correctly? If not please tell me where I'm doing wrong?
    Thanks in Advance,
    Regards,
    Praveen.

    Dear Experts,
    I was able to complete the process through MIGO.
    I have changed the valuation type of the serial number master through IQ02 from C3 to C2. Then I have done the GR w.r.t the order. Now it has posted the document.
    There were some errors while doing this, like some settings missing in OBYC for GBB. That also I have rectified then it allowed for the GR.
    Surprisingly, it not allowing to post through IW8W where everything will change automatically, like Valuation type from C3 to C2 etc...
    I am not able to understand why this is not happening?
    The steps I followed would be work around.
    Can some please help me out ?
    Regards,
    Praveen.

  • Problem with printing JFrame with several other components on it

    Hi,
    i am trying to print out a JFrame that contains other Swing and AWT components, such as JTables and menus etc.
    The problem is that the options that i select from the pageformat dialog, do not get set when the printing is taking place. As a result my jframe gets cut up into 4 differnet bits and each comes out on a seperate page. I cannot specify number of copies or size of paper either. Also once the ok button is pressed on the print dialogue, then the print dialogue comes back again and i have to press Ok, or Cancel to get rid of it. My code is below, please can someone suggest anything:
    ]public int print(Graphics g, PageFormat pf, int pi) throws PrinterException
    if (pi >= 1)
    return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D) g;
    g2.translate(pf.getImageableX(), pf.getImageableY());
    g2.setColor(Color.black);
    paint(g2);
    return Printable.PAGE_EXISTS;
    PrinterJob pjob = PrinterJob.getPrinterJob();
    PageFormat pf = pjob.defaultPage();
    pjob.setPrintable(TransponderGraph.this, pf);
    try
    pjob.print();
    catch (PrinterException e) { }

    Ok, try this.
    Change this:
    <link href="
    http://www.jonbarron.org/css/style.css"
    rel="stylesheet" type="text/css" />
    to this:
    <link href="
    http://www.jonbarron.org/css/style.css"
    rel="stylesheet" type="text/css" media="screen" />
    Somewhere in that stylesheet lies your problem.

  • Facebook doesn't load in ff or IE....sometimes I can get it by doing other things and then some of the games don't load completely ....have done all updates so what could be the issue

    facebook is my homepage in ff.so I login and then my homepage doesn't load.. ...sometimes I can go to fb help and click on games or other pages and it comes on by way of games usually.....but after a while it goes back off....same way in IE ....have done all updates got all latest versions so what is wrong ....I have read everything on this computer ...it has been this way for nearly 2 weeks now....so please help....even if I get the home page to come up then some game issues face me....loading halfway ...no friends names are showing etc.Please help........

    When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive.  It would be a few months old so it wouldn't have the complete library on it....any ideas?  I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.

  • Problems with IPod turning on and other things.

    Recently I turned on my IPod shuffle and the green light goes on. I am thinking, great, it is working, but then the light won't turn off and because of it I can't press play or use any other buttons available to me. Somtimes where that green light goes on it flashed, green, orange, green orange, or somthing like that. Also, I have charged the thing and when I pressed the button on the back to display the battery charge no lights came on at all. Anyone knowing how to fix the problem and their help would be very much appreciated. Thanks.
    Gateway FX400X   Windows 2000  

    Also, when I went into my computer, and wanted to see what was in my IPod, it said there was a hidden file that I don't know how to remove, so yeah.... Help would be greatly appreciated.

  • Syncing and doing other things?

    I just wanted to know if with a multi core processor (i7 2600k) and 8gb of ram that I need to worry about slowing down things on my classic syncing if I play a game or something while it happens?

    No. I have a 2010 MB with 4GB ram and a C2D processor. I bought my Classic last night and used my computer on the net while syncing. Loading 12,400 songs took about two hours.
    The iPod Classic seems to load music a bit faster than my iPhone 4S.

  • Problems seeing 1 person while doing 3 person chat

    While chatting in ichat with 3 people, 1 person, who is always the same, he is not able to be seen by 2 of us, yet we can hear him, and he can see both of us. When ever we do a 2 way chat between any combination of us 3, it works perfectly fine. We tried setting bandwith limits of 200 and 500 kbps with no luck, 2 of us are running mac 10.6.3, and the person who is having trouble connecting to us in the 3 person setting is running 10.4.11. Us two who are on 10.6.3 are running ichat 5.0.3, while the person running 10.4 is running ichat 3.1.9. Any ideas guys? Thanks.

    We fixed it, the person who was freezing just applied some updates and fixed.

  • MATSHITA DVD-R UJ-816 DVD burn fails if computer is doing other things too

    I can burn DVDs successfully if I leave the computer alone and don't try to do anything else with it while the burn is taking place. However, if I am printing or typing or even using the Finder at the same time, then the burned disk will not verify (errors in sector such and such). This is with Toast 7 and the Superdrive. It also happens with my external Pioneer 4x burner too.
    Is this normal?

    Just a note of interest. as a brody points out.
    It is not a good practice to burn DVD's and use other applications at the same time.
    Burning is not only very Ram Intensive, there are several other processes that are taking place as well.
    It is a very good idea to burn by itself and not do any other process.
    Many users that try to multi-task while burning report burner errors and overall poor preformance.
    You are also using a burner that is a few years old as well and there have been updates to not only the burner, but firmware and software and media as well.
    Cheers Don

  • When im listening to music and doing other things with iPad at the same time, the music stops and starts at random?

    Can't understand why my music cuts in and out?

    Have you tried restarting the iPad?  (Not just sleep, but hold the power button down until you get the slide to power off.)

  • My songs are skipping in i tunes when i am playing games or moving the mouse doing other things and only happens on computer not my devices

    My songs are skipping in itunes and it is just on computer and happens when i burn to cds songs skip. My other devices the songs don't skip. And skipping is when i am playing a game or moving mouse and checking on something and it is most of songs.

    Hello Cathy 21084,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Troubleshooting songs that skip
    http://support.apple.com/kb/ts3217
    Make sure song files are not damaged
    If a specific song skips when you play it, it may be damaged.
    1. Delete the song and update your iPod.
    2. Insert the CD you used to import the song and import it again. If the CD is scratched or dirty, iTunes may not be able to import the song. Try cleaning the CD or use a different one. If the song was imported or created using a third-party application, try the following:
    Use iTunes to import the content directly from the CD.
    Convert the content to an iPod-compatible format using iTunes.
    3. Update your iPod with the new copy of the song.
    Best of luck,
    Mario

Maybe you are looking for

  • Where do I find the global package array g_fnn for a particular column?

    Hi Everyone, I found out from one of the tutorials that when a page is submitted, the value of a column is stored in a global package array. Can you tell me where or how I can find out what nn in g_fnn would be for a particular column? I was thinking

  • Shared Services Assign Access Control for Essbase

    Hi we have a used who has his provisioning in form of filters in essbase group. I tried assigning his filter to thim through Assign Access Control in shared services. I'm able to see the user and also the the filter I created for the user but when I

  • How to upgrade hard drive on a compaq f700

    I have a compaq presario f700 with a 80gig hd and  i am try ing to upgrade to a 250 hd. I have tried several method, copying, cloning the drive, and reinstalling vista on new drive, but none work. is there a size limit for this system, has any one ha

  • Can Viruses on Windows Run While I am Using OSX

    Hi, Today I ran a Clamxav virus scan on my windows bootcamp partition while using my normal OSX operating system. The scan detected a Trojan.agent in the official google chrome (downloaded from google.com) and a Trojan in the official steam app (both

  • Proxy Credentials In AIR

    Hi Guys, I know that Adobe AIR gest the proxy details from the OS automatically, thats fine. Is that information possible to obtain in the rest of the program at runtime? Thanks Jaz