Showing a jwindow only when the image is loaded

Hi,
excuse me for the simplicity of my question, but I'm a beginner..
I want to show a jwindow for few seconds opening my program. This jwindows has a jpanel with an image. The problem is that, when the jwindow is showed, the image isn't loaded and one sees the empty jwindow. Can I wait that the image has been loaded to show the jwindow?
The image is setted by a
Image i=Toolkit.getDefaultToolkit().getImage("img\\icon.gif");
g.drawImage(i, 10,10, null);
in paintComponent of my JPanel.
Thanks in advance!

Don't know if this will solve you problem or not but the easiest way to display an image is to simply use a JLabel:
JLabel label = new JLabel( new ImageIcon(....) );

Similar Messages

  • Can I show a spinner when the images are loading

    I am now using flash builder 4.5.1 to create a mobile application. there will be multiple images in the view. I want to use  a spinner to indicate the image is loading, and once the image loaded,  the content of each image be replaced by the original mobimage.
    1) For IconItemRenderer, how to show the spinner?
    2) For the Image control, how to show the spinner?
    Thanks and hope you can understand my question and also hope some people can answer me.

    Is working on FCE projects while all the video files are saved on an external drive a bad idea?
    Not at all. This is the correct way to work with a laptop.

  • How to query from view with parameter, only  when the JSP-page loading

    I use JSF/ADF BC, create two viewes:view1 and view2, in the JSP page the user press a button to query from the view1, but I hope the view2 can be queried only when the page loading, it have no relation with user-operator, and pass the column value of view2 into some variables, the view2 return one record.

    Hi -
    You may want to have a look at this other thread:
    Re: Execute ViewObject with Parameters at JSF Page Load?  JSF/ADF/BC 10.1.3
    John

  • Ipad shows itunes icon only at the center after loading IOS 7

    Hi,
    I downloaded IOS 7 to my  4 year old daughters ipad 2 and after completion the screen only shows a usb picture and an itunes icon on the center.please help shes been crying to play with it again.thank you.

    Hi,
    Please see: http://support.apple.com/kb/HT1808 for assistance.
    Regards,
    Steve

  • On Mac when i enter full screen mode, how do I get bookmarks toolbar to show? I only have the address and tab bars showing!

    Im on the latest version of firefox 7.01 on Lion OSX mac.
    When i enter full screen mode, how do I get bookmarks toolbar to show? I only have the address and tab bars showing!

    hello davinci2, please right-click any bookmark where this is happening, go to ''properties'' and make sure that they are not set up to open in the sidebar.

  • When i plug my 3rd generation ipod touch into my computer, itunes doesn't notice it, and the computer says it is just a digital camera. i can only see the images on it. Can anyone help?

    When i plug my 3rd generation ipod touch into my computer, itunes doesn't notice it, and the computer says it is just a digital camera. i can only see the images on it. Can anyone help?

    Try
    iOS: Device not recognized in iTunes for Windows
    I would start with              
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    Before you reinstall the Apple software, also remove iCloud vi Control Panel Remove programs. The reinstall the Apple programs
    New cable and different USB port?
    Runs this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Try on another computer to help determine if computer or iPod problem

  • Why is the decline button for phone calls not available when the phone is locked? I need that button and it shows only when the phone is not locked on iOS 7

    Why is the decline button for phone calls not available when the phone is locked? I need that button and it shows only when the phone is not locked on iOS 7

    Yep. You need to touch the sleep/power button once to silence the ring, and twice in order for the call to go directly to Voicemail.
    Personally, I dont understand why Apple eliminated this. If you wish to give Apple feedback, do it here:
    www.apple.com/feedback

  • Photoshop CS5 interface gets really slow *only* when an image is open

    So this is really odd. Photoshop gets really slow when any image, regardless of size is open. When there are no images open it runs smoothly. The interface gets really laggy, filter usage, tool selection or any other usage is really sluggish, but only with an image open, even if it's a single pixel.
    I've tried different performance settings - changing where the scatch drive is, how much memory to allocate, what the cache levels are set at, enabling/disabling openGL, etc. It makes no difference if it's after a fresh reboot or if it's been on for days. No software has changed since the upgrade. Memory test don't show any issues and no other application has this problem - Illustrator, After Effects, Maya, Mudbox, etc. are all fine.
    My system specs
    Windows 7 x64 Enterprise - Service pack 1 installed
    Dual Xeon quadcore E5620 @ 2.4GHx (sixteen threads w/hyperthreading)
    96 GB Ram - DDR3 - 1333 MHz / PC3-10600 - registered - ECC
    Nvidia Quadro FX 3800 - with latest stable performance drivers v 295.73 (tried changing these, no affect)
    Western Digital VelociRaptor  150GB 10000 RPM 16MB Cache SATA 3.0Gb/s OS Drive
    X3  Seagate Constellation 2TB 7200 RPM SAS 6Gb/s setup in a RAID 5 config
    I'd think it would be a memory issue if all apps had similar problems, or if PS had issues when just being open. It's odd that it happens only when an image is open.
    Thanks for any an all help.
    Duncan

    Duncan York wrote:
    I've tried different ..., enabling/disabling openGL,
    Just to make sure, did you close and restart Photoshop after changing OpenGL settings and before testing?  That's important, and not having done so could lead you to invalid assumptions.
    -Noel

  • HI, I recently upgraded my operating system IOS 5.0.1 on an iphone 3gs. MY question is, how do I get the text messaging preview to just pop up so that I can see the name only when the lock screen is on? The conventional ways of doing this aren't working

    HI, I recently upgraded my operating system IOS 5.0.1 on an iphone 3gs. My question is, how do I get the text messaging preview to just pop up so that I can see the name only when the lock screen is on? The conventional ways of doing this, such as using turning off the SMS preview under the "passcode lock", well that option no longer exists, or if it does, I'm somehow missing it.
    When I go to the "messages" setting under settings on my phone, I still don't see an option of turning it off.
    If I can just get the name of the person sending the message, as I had it before, I'd be happy.
    Help!

    That option still exists in Settings > Notifications > Messages > Show Prview (OFF) and View in Lock Screen (ON). Here's how to configure your Notifications and Notification Center for iOS 5: http://iphone-and-i.blogspot.com/2012/01/how-to-customize-notification-center-in .html

  • Avoid the display of the red cross when the image is absent

    The user upload images to my web site.
    He can enter 3 images; but sometimes he enters only 2.
    When an image is absent, the browser try to find it and
    display a small red cross at the left corner. My concern was to
    avoid the display of this small red cross when the image is not
    there?
    I tried to imbricate HTML and PHP code, but it does not work.
    Is there somebody who can help me?
    Thanks a lot.

    <td><?php echo ($dest_fichier1!=''?'<img
    src="images/annonces/' .
    $dest_fichier1.'">':'' ?></td>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Annie Benech" <[email protected]> wrote in
    message
    news:ek7841$is4$[email protected]..
    > The user upload images to my web site.
    > He can enter 3 images; but sometimes he enters only 2.
    > When an image is absent, the browser try to find it and
    display a small
    > red
    > cross at the left corner. My concern was to avoid the
    display of this
    > small red
    > cross when the image is not there?
    > I tried to imbricate HTML and PHP code, but it does not
    work.
    > Is there somebody who can help me?
    > Thanks a lot.
    >
    > <div class="boite-niveau2">
    > <div class="boite-present-immo">
    > <table width="600" border="0" cellspacing="0"
    cellpadding="0">
    > <tr>
    > <td><table width="300" border="0"
    cellspacing="4" cellpadding="0">
    > <tr>
    > <td><img src= "<?php echo "images/annonces/"
    . $dest_fichier1 ?>"
    > width="300" /></td>
    > </tr>
    > <tr>
    > <td><table width="300" border="0"
    cellspacing="0" cellpadding="0">
    > <tr>
    > <td><img src= "<?php echo "images/annonces/"
    . $dest_fichier2
    > ?>"
    > width="148" /></td>
    > <td width="2"> </td>
    > <td><img src= "<?php echo "images/annonces/"
    . $dest_fichier3
    > ?>"
    > width="148" /></td>
    > </tr>
    > </table></td>
    > </tr>
    > </table></td>
    > <td width="20"> </td>
    > <td width="270"><?php
    > if ( $_SESSION['type_annonce'] == 'vente' )
    > {
    > echo "Vends ";
    > }
    > else
    > {
    > echo "Loue ";
    > }
    > echo "{$_SESSION['type_de_bien']}";
    >
    > echo " à <b>{$_SESSION['commune']}</b>
    <br>";
    >

  • Text field with promp msg only when the field is empty

    I want to make a TextField with prompt message but The problem with google code was that the prompt msg is shown only when The textField is not clicked, I want to show the prompt msg even when the text field is clicked,when I type a letter inside the textField it vanishes and when i delete all of it, I'll see the prompt msg again and I want to Load the cursur at the text field when the page is loaded, How can I achieve that?

    Not working!
    One new problem I have confronted, I have edited the htm file with the previously mentioned code, yet, when i started flex again, the code was not there?
    Is it a derived file?
    If so how can I make permanent changes there?
    i used the code:     
    private function onLoad(event:Event):void
                 focusManager.setFocus(this.textId);           
    As using
    private function onLoad(event:Event):void
    shows the red cross i.e. error at a particular step at the
    <mx:Application.......
    and the error shows as
    Incorrect numbers of arguments. Expected 1.
    I guess its a very simple problem yet I don't know why I am getting so complex.
    I have faced certainly a nice problem, it sometimes works and sometimes doesnt,
    when I run from the flex bulider it works, If I click on the html file it doesn't.. It may happen it wont work again in future.

  • Is there a way to play an mp4 file at the beginning of a published project only when the project is accessed from a specific site?

    Is there a way to play an mp4 file at the beginning of a published project only when the project is accessed from a specific site?
    A little background info. I use Captivate 7 and currently have over 100 projects that I maintain on a quarterly basis. I publish using the SWF format and upload the swf/htm files to a server where they are then accessed from a few locations (within our online documentation, in our software product, on two different websites). Many of the projects are linked so some will be viewed as a series and others viewed as a standalone video. Each video uses the same template and includes an intro and end slide. Now my organization wants to implement a new intro to all videos (those I publish and those from several groups across the organization). My current intros provide overview material for the specific video so the new intro, which is an animation with audio in mp4 format, would need to be placed at the start of each project. The issue is, the intro adds 9 seconds to every video and in many cases doesn’t add any value (say, if a user accesses the video from within our product or views the videos as a series). I’ve talked it over with my boss and we want to try to add the intro only to videos accessed from site X, not any other location. So now to my question. Is there a way to play an external mp4 file (intro) only when the published project is accessed from a specific site, therefore eliminating the need to update each project? Maybe there's a way to add a parameter or variable to the URL or the html code?
    Thanks in advance for your suggestions. Please let me know if you need additional information.

    AimeeLove,
    I have a solution for you.  You may have to modify the code a little bit based on how long the timeline animation is for your clock.  I based mine on 3 seconds to complete a minute hand sweep around the clock.
    Milliseconds for each point on the clock:
    12 = 0
    1 = 250
    2 = 500
    3 = 750
    4 = 1000
    5 = 1250
    6 = 1500
    7 = 1750
    8 = 2000
    9 = 2250
    10 = 2500
    11 = 2750
    In the mouseover section for 12 o' clock, put this code...
    myVar = setInterval(function(){
         var pos = sym.getPosition();
         if (pos > 0 && pos < 50){
              sym.stop(0);
              clearInterval(myVar);
    },10);
    When you point to the time, the setInterval method loops every 100th of a second and checks the current position of the timeline.  When the timeline reaches the range between 0 and 50 milliseconds (almost impossible to hit 1 specific point), the timeline will stop at 0.  Also, the clearInterval will be fired to stop the loop.
    In the mouseout section, put this...
    sym.play();
    clearInterval(myVar);
    It start the clock again, and it also clears the loop in case you mouseout before you reach the range.
    Make sure that myVar is a global variable so you can clear it from the mouseout section.
    Repeat this for each point on the clock.  To avoid potential conflicts, you may want to use my12, my1, my2, etc. instead of myVar.  I put the milliseconds at the top that you would use as the beginning of the range.  50 milliseconds should be enough to catch it.  So, for 5 o' clock, you would make your range between 1250 and 1300.
    Let me know if you have any questions.  Thanks!
    Fred

  • Preview will not print 8.5" x 14", only when the computer feels like it

    This problem has gone on for too long and I don't know what else to do. I have flyers that I cannot print because preview refuses to recognize the document size correctly and consistantly, and I have no other program that can print to our copier.
    This happens with any PDF that is not 8.5" x 11". Both 8.5" x 14" and 11" x 17" exhibit the same problem. First I open a PDF in Preview, then I change the document size in Page Setup to "US Legal" and scale of 100% (the scale is always wrong because it is automatically resizing the document to fit on 8.5" x 11"). Then I go to print, check under Paper Handling and under Destination Paper Size is says "Use documents paper size: US Letter". This does not change no matter how many times I visit Page Setup and no matter how many times I save and re-save the file.
    At random it will recognize the document size as "US Legal", but this happens only when the computer feels like it, at least that's what it seems like because there are no other settings that are different between one file and another that would cause it to print one as Letter and the next one as Legal.
    Some PDFs are created in Photoshop, while other are created in Acrobat. I cannot print directly from Acrobat because of some weird problem with our copier; I cannot print from any Adobe CS3 software.
    I don't know what to do. Any help is greatly appreciated.

    com.apple.print.custompapers.plist didn't exist on my machine, but com.apple.Preview.plist did. I moved it to the desktop as you suggested, opened the files in Preview and this time it worked. Thanks so much!
    I tried looking at the file, but it didn't make any sense to me. Must have been something in there that caused the problem, though.

  • Sender file communication channel polling only when the file is written

    Hi guys,
    I have the following scenario:
    I have developed an XI interface that takes a .txt file from SAP R/3's file system, usr/sap/trans/ and delivers it into another ftp location. The problem that we face is that the file is written into source directory from an ABAP program. As a result, XI go and polls into source directory when the file is not completely written, or when it is empty, which blocks the process.
    Is there a way to force XI in order to poll the source directory only when the file is complete?
    We have thought of exporting the file into a name that XI does not expect and as soon as the file is complete to rename the file from inside ABAP program into what XI expects.
    However, the command inside ABAP changed the Code page of the file and we cannot see some special characters in the file that is delivered to the ftp location.
    Any ideas??

    Hi Evaggelos,
    from <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm">SAP help: Configuring the Sender File/FTP Adapter</a>:
    Advanced Mode
    To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.
    &#9679;      Msecs to Wait Before Modification Check
    Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed
    Regards,
    Udo

  • Why is Fault Policy working only when the BPEL's transaction is requiresNew

    Hi All
    I've defined Fault policy & fault bindings files for faults in my BPEL process. I'm using Oracle SOA Suite 11g.
    But the fault management framework is properly working only when the transaction property(bpel.config.transaction) of the BPEL is set to "requiresNew" in composite.xml
    When i modify it ot required, its not working, i.e. it is waiting for some period and erroring out. I could not manage these errors from the EM as we do for those in Fault Management Framework.
    Why is this behavior?
    I went thru this article, but could not understand it
    Transaction and Fault Propagation Semantics in BPEL Processes(http://docs.oracle.com/cd/E21764_01/integration.1111/e10224/soa_transactions.htm)
    Can someone pls explain this.
    Regards
    RaviKiran.

    Please refer http://docs.oracle.com/cd/E21764_01/integration.1111/e10224/soa_transactions.htm
    Thanks,
    S

Maybe you are looking for

  • Leave Cancellation Approval is not triggered

    Hi Frnds,    The leave cancellation workflow which is configured in IMG is not triggered for leave request with status APPROVED or SENT excluding the status u201CPOSTEDu201D. IMG Configuration for workflow: 1) WS12300111                u2013 New Requ

  • Message are being viewed by other iphone

    So I upgrades first to the new i0s7 and it was fine , my daughter did hers 2 day's later and now radomly get's some of my messages that I send or people send to me? Any idea how to fix this?

  • I have 3 photo albums that I can't remove from my iPod

    I have 3 photo albums on my iPod that I would like to remove, but can't.  Is there any way that I can get rid of the albums and not lose any of my music or other info stored on the iPod?

  • HAL problem

    I am a newbie to Arch Linux. I am having some difficulties with HAL. I cannot get it to mount cd's audio or data, or external drives. My user account is part of the optical and storage groups but e17 gives me the message "Access Denied". I think it m

  • How to remove your phone number from the iPad

    How do I get my phone number off of my iPad? I don't want to receive texts on the iPad. I don't want to just turn it off, I want it off permanently.