Some images are not appeared  on the JButton

Hi all
I want to appear an ImageIcon on my JButton
Some images are appeared on the button when run the code,
but some images are not and the button appeared as a default
button why ?
the problem in my code in this statement
JButton   merc = new JButton (new ImageIcon(" door.jpg " ));Thanks in advance.

I suggest that you break down your statements even further to see where the problem is.
So if this the problem is on this line:
JButton   merc = new JButton (new ImageIcon("door.jpg" )); //string corrected?try to break it up a bit like so:
JButton merc = new JButton();
File imageFile = new File("door.jpg");
if (imageFile.exists())
   ImageIcon icon = new ImageIcon(imageFile);
   if (icon != null)
      merc.setIcon(icon);
   else
      System.out.println("icon == null");
else
   System.out.println("image file doesn't exist");
}

Similar Messages

  • Rendered images are not appearing on the webpage. works fine on IE. All plugins appear to be present includeing Adobe Flash

    rendered images are not appearing on the webpage. works fine on IE. All plugins appear to be present including Adobe Flash

    If that only happens on a specific page or domain then make sure that you do not block images on that domain.
    See [[Images or animations do not show]]
    *A way to see which images are blocked is to click the favicon (<i>Site Identification</i> icon) on the left side of the location bar.
    *A click on the "More Information" button will open the Security tab of the "Page Info" window (also accessible via "Tools > Page Info").
    *Go to the <i>Media</i> tab of that "Tools > Page Info" window.
    *Select the first image link and scroll down though the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.
    *You can see the permissions for the domain in the current tab in Tools > Page Info > Permissions
    *You can see all image exceptions in Tools > Options > Content: Load Images > Exceptions

  • DPM 2012 R2 Backup job FAILED for some Hyper-v VMs and Some Hyper-v VMs are not appearing in the DPM

    DPM 2012 R2  Backup job FAILED for some Hyper-v VMs
    DPM encountered a retryable VSS error. (ID 30112 Details: VssError:The writer experienced a transient error.  If the backup process is retried,
    the error may not reoccur.
     (0x800423F3))
    All the vss Writers are in stable state
    Also Some Hyper-v VMs are not appearing in the DPM 2012 R2 Console When I try to create the Protection Group please note that they are not part of cluster.
    Host is 2012 R2 and The VM is also 2012 R2.

    Hi,
    What update rollup are you running on the DPM 2012 R2 server ?  DPM 2012 R2 UR5 introduced a new refresh feature that will re-enumerate data sources on an individual protected server.
    Check for VSS errors inside the guests that are having problems being backed up.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • InDesign Book Project...some images/graphics not appearing in print-ready PDF

    Some images/graphics not appearing in print-ready PDF. Why? and how to fix.
    The images are linked.

    That didn't work, but i copied images from other parts of my document that did work and pasted/resized to replace images that didn't import and that seemed to work.
    still wish i could figure out why it happens in the first place so i don't have to do this other process.

  • Mail messages in my In Box are not appearing in the list of messages.

    Mail: SOME mail messages in my In Box are not appearing in the list of messages.  Instead, there's a blank line in its place if already read, or just the blue dot if unread.  But when I click on the line, the message's column/header detail appears (and I can open it).
    (Coincidental or not, immediately prior to this situation, I established a New Rule that mail coming from my son's email address should be Moved to the IN Box as they had been going to Trash.  None of the emails I'm questioning have any reference to his email address in them.)

    Continuation of info (from GDTGG): When I leave that mail message and click on a different one, the blank line marking its place once again appears for the message.  (There was a similar problem posted by someone else in 2009 entitled "Inbox Has Blank Lines" but with no apparent solution that I could find.)

  • I am trying to send photos to the cloud from my phone to my iPad but they are not appearing in the stream. I have read the instructions and I think I am doing it right or am I missing a part of the process?

    I am trying to send photos to the cloud from my phone to my iPad but they are not appearing in the stream. I have read the instructions and I think I am doing it right or am I missing a part of the process?

    HI,
    Have you done this before ? And if so, is photo stream turned on on your iphone and ipad. and as Alfred DeRose pointed out they must both on the same icloud account.
    If you're new to this, you might want to do some research. Photo stream is different from camera roll and albums. Many have been on this sight looking for their photos stored in icloud after restore, etc. and they're not there. Also, after thirty days icloud deletes your photos from photo stream.
    So if you're not aware, you might want to google your question. We're using the camera connection kit soon and I am learning about it. From all I've read, I'm also not the biggest icloud fan. I use dropbox. We plan to put photos taken on ipad with a camera/iphones into albums on the ipad. We'll keep all on the sd card until (and after) they can be uploaded to a computer.
    An example of an article we can learn from -
    http://www.macobserver.com/tmo/article/how-to-understand-and-work-with-your-iclo ud-photo-stream
    Hope this helps.

  • Fcx4 bin clips are not appearing in the viewer after clicking on them.

    fcx4 bin clips are not appearing in the viewer after clicking on them , i need help getting them to appear in the viewer.

    I have the same issue. I am using apex.oracle.com for some test applications, but for last couple of weeks when I login and click the "Application builder" I could not see my applications there (around 4-5 of them)! It says No applications found.
    Neither I have any application groups setup nor do any criteria given in "Application" search field under "Application builder".
    The only way I could access some, if not all, of my applications is to pull it from the link under the context box "Recent" (which you can see in the right hand side of the "Application builder" page.)
    Any help is greatly appreciated. This issue is not a show stopper as I could still pull out my critical applications from the recent link, but its definitely a worrisome issue.
    Thanks in advance
    Regards
    Ligon Gopinathan

  • /101,/560 are Not appearing in the RT cluster while running  the live run

    HI Experts,
    Pls help me to update the problem,While running the live payroll run the wagetypes /101,/560 are Not appearing in the RT cluster .
    and all primary wagetypes are missing in the RT log .I have checked the processing class table for each classes but its perfecly placed.Whatever I placed in the IT 8 is not appering in the RT LOG .I have run with Standard and custom schema's also for indian payroll.Any settings has been changed for basic infotype??wht could be the reson.Early respose will be appreciated.
    Regards
    Chandra

    Hi  Chandra,
    To me, your problem seems like a patch updation problem.
    Please contact your basis team.
    Technical wagetypes not coming in the RT table
    Regards,
    Dilek

  • Images are not visible in the iPhone.

    When I open iTunes there are number of images found in the iPhone, but the images are not visible in the iPhone actually.

    I using local deployment. I deploy my application directly from NWDS to a Mobile Client running also locally in my machine. Maybe I'm wrong, but I think that Mobile Client look for resources in NWDS workspace.
    This is the dpi file located in the Mobile Client inbox folder when I perform the deployment.
    <?xml version="1.0" encoding="UTF-8"?>
    <deployment>
    <device>
    <repository>
    <mcd name="IrviaDemoApp" namespace="" version="1">
    <action type="install"/>
    <location type="local">
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\MOBILE-INF\MCD.xml" property="mcd" type="file"/>
    <component name="hpcds.es~irvia_demo_app">
    <applications>
    <application deploy="true" name="IrviaDemoApp"/>
    </applications>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\bin" property="bin" type="dir"/>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\gen_wdp" property="gen_wdp" type="dir"/>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\src\mimes" property="mimes" type="dir"/>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\gen_wdp\application-j2ee-engine.xml" property="j2ee_xml" type="file"/>
    </component>
    </location>
    </mcd>
    </repository>
    </device>
    </deployment>
    There is a <source> entry for the mimes directory, where "Component images" are located.
    PD: Sorry about my poor english. I hope you to understand me.

  • Convert a catalog form PSE 7 to PSE 13 : Conversion works, but images are not related to the catalog anymore so you have to connect each single picture !!! How can I get the right relation automatically ?

    My images are not related to the converted catalog, only preview works, tags and other information is given, but the (network) path to the original images is missing and is substituted by a local path with c:\. How can I solve the problem automatically ?

    I actually need to apply this to at least a couple different layouts. Two exampled below (The outlined boxes are text areas, the black boxes where the product images will go.)
    I prefer InDesign5, but I have 6 too.

  • Two external hard drive are not appearing on the desktop anymore on my 2008 24" iMac. One is a Lacie d2 Quadra and the other is a G Drive. Both are 1 Tb

    Two external hard drive are not appearing on the desktop anymore on my 2008 24" iMac. One is a Lacie d2 Quadra and the other is a G Drive. Both are 1 Tb

    Are they daisy chained? Have you tried them one at a time? Have you tried a different FireWire cable? Do they show up in either system profiler or Disk Utility? Have you reset the SMC? http://support.apple.com/kb/HT3964

  • Sometimes, some images are not shown...

    Hi!
    Out applet shows (or loads?) all images correctly, but sometimes, one or more images are not shown (or loaded?). What can it be?

    I am having a similar problem so maybe someone can help me too.
    I find that my images load correctly most of the time, but once in a while (say 1 in 4 attempts), some of them dont load. The reliability of this is much better now that I have moved the images out of the jar, but its still not right
    I also find that sometimes the classes do not load. I get classdef.not.found for a file that really should be there. I can see that the jar containing it has been downloaded to the temp dir. I have been clearing my cache out manually for now between every attempt.
    I am not sure what code to show. I dont think its necessarily a problem with images since classes dont always load either, but here is the code for loading images anyway.
            MediaTracker tracker = new MediaTracker(applet);
            for (int i = 0; i < img.length; i++) {
              img[i] = applet.getImage(urlCodeBase, imagePath + images);
    tracker.addImage(img[i], i);
    tracker.waitForID(i);
    if (tracker.isErrorAny()) {
    System.err.println("Error loading image " + images[i]);
    My web content is being delivered by 3rd party hardware which might be rather slow - its hard to tell. My entire web content is approx 200KB. Results are the same using IE or Mozilla.
    Any ideas would be a great help!

  • Some images are not loading...including yahoo logo on search pages. Firefox 8.0

    most images are not showing up in browser....including yahoo logo on search result pages and icon images in gmail. I have uninstalled and reinstalled firefox.

    If images are missing then check that you aren't blocking images from some domains.
    *Check the permissions for the domain in the current tab in "Tools > Page Info > Permissions"
    *Check that images are enabled: Tools > Options > Content: [X] Load images automatically
    *Check the exceptions in "Tools > Options > Content: Load Images > Exceptions"
    *Check the "Tools > Page Info > Media" tab for blocked images (scroll through all the images with the cursor Down key).
    If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.
    Make sure that you do not block third-party images permissions.default.images
    *http://kb.mozillazine.org/Images_or_animations_do_not_load
    Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
    *http://kb.mozillazine.org/Website_colors_are_wrong
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    There are also extensions (Tools > Add-ons > Extensions) and security software (firewall, anti-virus) that can block images.
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Lead time values are not appearing in the report for current year.

    Hi friends,
    Iam checking a report in production.  where lead time values are displayed as 0 for 1 key figure lead time3 (w/0 dim) . i found there is a formula for this it shows like NODIM ( 'Lead Time 3' ).and there is a value for cal.lead time
    how can i get values in the report.
    Thanks ,
    VRV.

    Hi,
    Although your question is not clear, I understood that the formula built on that KF is NODIM. Basically it means, units of measurement is not considered when calculating.
    Eg: 5 Minutes + 5 Kilograms = 10
    You please try to analyze your KF by the above logic. Then you would be able to figure out why the data is not appearing in the report..
    Assign if helps...
    Regards,
    Suman

  • Some images are not getting loaded

    I am online tutor. And today i got a problem . Images are not getting loaded and also many things are not getting loaded. But when i use internet explorer i don't have that problem . But i don wanna u internet explrer. Can any one help me. And the site with which i am facing problem is tutor.tutorvista.net

    Please try the instructions in this article: http://support.mozilla.com/en-US/kb/Images+or+animations+do+not+show
    Hope this helps. :)

Maybe you are looking for

  • 4KE5-Actual Distribution for Profit center

    I am facing the below error when I execute the 4KE5 for profit center actual distribution. I have maintained the number range but still the same error is there. I defined number range for Document type OC for year 2008. please advise how to overcome?

  • Question about Abstract Classes and Class Inheritance

    The semester is winding down, and the assignments are getting more complicated.... Prof has given us a project involving both an interface and an abstract class. There's a class Person, then an abstract class Employee that extends Person, and two typ

  • Increase bScale in DBPARAMBINDINFO Error in PB 12.1 Ver 7000

    Hello.  Can't seem to get around the below error in PB 12.1 Ver 7000 when calling a Stored Procedure from Powerscript and am passing Datetime values.  I have played around with the connection strings Date formatting, but no matter what I attempt, it

  • Can I sort by the second element in my vector?

    The first element is first name and the second is lastname. Right now I am using java.util.Collections.sort(v); This searches on the first name. I would like to search on the last name which is the second element. Any ideas?

  • HT4009 In App purchases not Credited to the App issue.

    I have been charged by Skyjet (Chaos Games) three times for their Gold Pack monies and then not had them creditted to the game itself. I have spent the last two months corresponding with their support bod and got no where. Is it worth persueing them