Why do i can't load the picture into my Appliction?

Belowing is create a Image and draw it,but I can not display it correctly !
Is it wrong in my path;
if abc.java put into the C:\
,and the picture.BMP could be putting into the C:\images ,is't right?
class abc {
Image im = new Image("images/picture.BMP");
g.drawImage(im,0,0);
}

2 things:
1) are you really certain that c:\ is the current directory at run-time? Just because the .java file is there does not necessarily mean that is your current directory. You should use /images/picture.BMP instead, assuming this is not an applet. Actually you should rather put the picture in your CLASSPATH and load it via getClass().getResource("/picture.BMP"), where picture.BMP is rooted somewhere in the CLASSPATH.
2) If this is an applet, you must use getCodeBase() instead to base your file name from, as applets cannot read the local file system.

Similar Messages

  • Whit the new iTunes how i can down load my pictures from the iPhone to the computer  to make more spaces

    whit the new iTunes how i can down load my pictures from the iPhone to the computer  to make more spaces

    Hi shadibader,
    I understand that you wish to import your photos onto your computer from your iOS device. Here is an article for you that will explain how to accomplish this:
    Import photos and videos from your iPhone, iPad, or iPod touch to your Mac or Windows PC - Apple Support
    http://support.apple.com/en-us/HT201302
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • HT1338 can I load the snow leopard os over my existing os and not lose pictures or songs

    can I load the snow leopard os over my existing os and not lose pictures or songs

    waasman wrote:
    can I load the snow leopard os over my existing os and not lose pictures or songs
    Yes if your already on OS X Snow Leopard 10.6
    See #8 Reinstall Just OS X + Software Update
    ..Step by Step to fix your Mac
    However you should backup files REGARDLESS as anything can happen at anytime.
    Most commonly used backup methods
    https://discussions.apple.com/community/notebooks/macbook_pro?view=documents
    Yes if your upgrading 10.4/10.5 to Snow Leopard 10.6
    However if your hard drive is more than 50% full, then it might be slow. Move just your users files temporarily to a external storage drive (not TimeMachine) and reboot, check in Activity Monitor than you have reclaimed drive space, then upgrade to 10.6, then reboot and Software Update to 10.6.8, then return your users files into their respective Music, Pictures, Documents etc., folders.
    If you have problems upgrading to 10.6
    How to erase and install Snow Leopard 10.6
    Optional:  For Snow Leopard Speed Freaks
    I do NOT advise you upgrade to 10.7 or later on 10.4/10.5 issued hardware due to risks and performance issues, your PPC based programs will not work and require replacement.

  • Why the speed of MacBook Air to download a web page is lower than iPad2? Even worse sometimes Ipad2 can but MBA can't load the web pages.

    Why the speed of MacBook Air to download a web page is lower than iPad2?
    Even worse ,Why sometimes iPad2 can but MBA can't load the web pages?

    Why the speed of MacBook Air to download a web page is lower than iPad2?
    Even worse ,Why sometimes iPad2 can but MBA can't load the web pages?

  • Hi. After I have loaded a picture into Photoshop some of the menu tools are greyed out and I cannot use the keyboard short cut, for instance I cannot use Ctrl   T to enter free transform mode. Also the toolbar is so small I cannot see the icons without ge

    Hi. After loading a picture into Photoshop some of the menu tools are greyed out and I cannot use the keyboard short cuts, for instance I cannot use Ctrl + T for free transform, how do I resolve this problem. In addition the tool Icons are so small I have to get close to the screen to see them, is there anyway the Icons can be made bigger without reducing the resolution of the screen.
    Thanks
    Derek

    Are you working on a background layer? If so, Ctrl + T will not work. Press Alt and double-click your background layer to convert to a normal layer (or right-click BG layer and select Layer from Background) and try again.
    If you're working in Photoshop CC 2014 you can go to Preferences > Experimental Features and tick "Scale UI 200% for high-density displays" to make your buttons and icons larger.

  • Can't load the update for Photoshop CC

    Get error U44M1P7. What is to do?

    Thanks. Finaly it worked. I don’t know why.
    Daniel
    Von: Jeff A Wright [email protected]
    Gesendet: Mittwoch, 19. Juni 2013 00:15
    An: leisi16
    Betreff: can't load the update for Photoshop CC
    Re: can't load the update for Photoshop CC
    created by Jeff A Wright <http://forums.adobe.com/people/JeffAWright>  in Creative Cloud Download & Install - View the full discussion <http://forums.adobe.com/message/5423109#5423109

  • Where can i find the pictures from massager?

    Hello, i have a little problem, i can't find my imassanger pictures in a folder or sth else. Where can i find the pictures?
    Thanks for help:)

    It takes a few steps but it's doable.
    Start with the contact. Tap edit. Tap edit under the photo. Tap edit photo in the window that opens, take a screen shot. Tap outside of the photo, tap done.
    Now we go to Camera Roll.  Choose the screen shot you just took. Tap edit. Put two fingers on the photo and separate them to enlarge it. Take another screen shot. Squeeze the photo back to normal size.
    Your photo is ready.
    Why they don't just save the contact photo in the first place I'll never know.

  • How can I stop downloading pictures into iPhoto and start down loading into a portable hard drive?

    How can I stop downloading pictures into iPhoto and start down loading into a portable hard drive?

    You could use the Image Capture application.

  • Why othe user can't see the logo I just placed as background?

    Hello,
    After putting a logo in the background as the manager, why other user can't see the logo?
    Many thanks

    Hello to both,
    I load the logo by General Settings- Font and Bkgd.
    It would be very time consuming to add the logo to each user. That is not very wise.
    Is there other way to get the users to see the logo?
    Many thanks to both for your prompt reply

  • Please help, I can't find the pictures which I took with my camera. Its like I never took them

    I can't find the pictures which I took on my camera, I still have lots of memory left, they are hidden or something . Oh and the other thing is that when I'm trying to save a picture as something that I like its say the the directory is full even when I put a single letter. I have a huge space on my memory card, I don't know what's wrong . Please help. Thanks

    See if you can boot into safe mode by holding down the shift key immediately after pressing the start button. Keep holding the shift key till a loading progress bar appears on the lower part of the screen. It will take a lot longer than normal to start this way. If you have Lion 10.7 installed you can try holding command-R  keys to get intto recovery mode and run disk utility.
    If you want some great tips on trouble shooting go to this link to frequent poster ds store's page.
    ds store's User Tips    https://discussions.apple.com/people/ds%20store?view=documents
    This one covers your problem    https://discussions.apple.com/docs/DOC-3392

  • After upgrading to Solaris 10 "Can't load the root filesystem" on V245

    I have a Sunfire V245 that was running on Solaris 9 (very stable). I upgraded to Solaris 10 (6/06) this morning and everything seemed to go smoothly. After the upgrade the system rebooted, but will not boot. I get the following uptput;
    Rebooting with command: boot
    Boot device: disk File and args:
    SunOS Release 5.10 Version Generic_118833-17 64-bit
    Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    pxb_bcm: cannot load driver
    Cannot load drivers for /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk@0,0:a
    Can't load the root filesystem
    Type 'go' to resume
    "go" attempts to reboot, but I end up back in the same place.
    Please help.
    Thanks in advanced,
    Craig

    It seems like the driver for that device does not exist. Since the system installed successfully it means that it S10 did find a disk. I wonder if that was a different disk than the default disk. Please boot to the miniroot and check the disk info.

  • I have an I pad 2 . I have put things for sale on Craigslist but I cannot put pictures on the ad. Is there an app or so etching I need to be able to load the pictures to the ad. I also have an I phone4s same thing with it. Appreciate any info. Thanks iPad

    I have an I pad 2 . I have put things for sale on Craigslist but I cannot put pictures on the ad. Is there an app or something I need to be able to load the pictures to the ad. I also have an I phone4s same thing with it. Appreciate any info. Thanks iPad

    Yes there is; http://itunes.apple.com/app/+craigslist+/id373576667?alreadyRedirected=1&mt=8

  • I have an I pad 2 . I have put things for sale on Craigslist but I cannot put pictures on the ad. Is there an app or so etching I need to be able to load the pictures to the ad. I also have an I phone4s same thing with it. Appreciate any info. Thanks

    I have an I pad 2 . I have put things for sale on Craigslist but I cannot put pictures on the ad. Is there an app or so etching I need to be able to load the pictures to the ad. I also have an I phone4s same thing with it. Appreciate any info. Thanks

    There are Craigslist apps that are nice, but trying using copy paste. Go to your photos, select the photo. Hold down your finger on it to copy. Then in the body of the post, hold down your finger and select paste.

  • I can't view the pictures I've downloaded from my ipad to my PC. The only options I have is Tunes, TV, Movies or Apps. How do I view pictures on my PC.

    I can't view the pictures I've downloaded from my ipad to my PC. The only options I have is Tunes, TV, Movies or Apps. How do I view pictures on my PC.

    What happens when you try to play the actual film ? And have you tried deleting them and (assuming that they're still in the store) redownloading them via the Purchased link under Quick Links on the right-hand side of the iTunes store home page - or going into Edit > Preferences and on the Store tab ticking the 'show iTunes in the Cloud purchases' tick box so that they show in the My Movies part of your library with a cloud icon against it for redownloading) ?
    (You can't store films in the cloud, whether they will show there for redownloading depends upon what country that you are in - and if you move countries or if the rights-holder removes them then you also won't be able to redownload them. Ideally you'd be taking a backup copy of all of your downloads, and not relying on being able to redownload them in the future.)

  • The computer that I used to sync my Ipad with crashed.  How can I copy the pictures from my Ipad to my new computer?

    The computer that I used to sync my Ipad with crashed.  How can I copy the pictures from my Ipad to my new computer?  When I try to use Picassa to import them I can only see the 'Camera Roll; folder but I have several other folders with hundreds of pictures in them

    To copy photos to your computer that were taken with the iPad, copied to it via the camera connection kit, or saved from emails/websites then see this page - on a PC you can use the windows camera wizard
    To copy photos that were originally synced from a computer you will need a third-party app on your iPad such as Simple Transfer which can copy them off via your wifi network. But as photos are 'optimised' when they are synced to the iPad, any that you then copy back to a computer may not be exactly the same as they originally were on your computer.

Maybe you are looking for