Image.createImage() problem with eclipseME IDE

I create directory struture like this:
PhotoView
|- class
|- deployed
|- res
|- src
|- verified
Images was put in res.
However, I am allways catched exception with the bold line.
Please, help me.
Thanks.
private void showImage(int index) {
imageForm.deleteAll();
Image img;
try {
img = Image.createImage("/pBirds.png");
} catch (Exception e) {
img = null;
e.printStackTrace();
ImageItem imgItem = new ImageItem("pBirds.png", img,
ImageItem.LAYOUT_CENTER, "Image");
imageForm.append(imgItem);
display.setCurrent(imageForm);
}

Maybe you should try to add the res folder to your project path?
project properties-> build path add folder....

Similar Messages

  • Problem with Netbeans IDE 5.0: Building Gui

    Hello,
    I have the following problem with Netbeans IDE 5.0 (I made the same with netbeans 3.6 and it works properly):
    Step 1) Create a myJPanel class (new JPanel Form)
    Step 2) make a simple operation on myJPanel such as adding a JTable.
    Step 3) Create a myJForm Class (new JFrame Form)
    Step 4) Adding a JPanel to myJFrame (default name jPanel1)
    Step 5) Select JPanle1 within myJFrame and go to code-> custom creation code and write "new myJPanel();"
    this should set the jPanel1 (and all its contents and behaviours) created
    in step 4 equals to myJPanel();
    Step 6) run myJFrame;
    ........ and nothing happens. It is dispalyed just a gray JFrame.
    It seems that myJFrame is able to istantiate myJPanel() but is not able to paint it. what's wrong?
    Hope you may help me,
    thx

    Unfortunately, Netbeans 3.6 files and Netbeans 5 files are not compatible. Except the Java source files, Netbeans uses other aditional files such as xml files etc for forming GUI and other reasons. I have also faced the same problem with you. Good luck.

  • Image size problem with Retina Macbook Pro

    I exported raw images to Jpg and then resized as 1200 x 800 resolution images through "Easy batch Pro" app. When I uploaded them, they were extremely large. I've tried it several times and the result was always the same. Is it a problem with "Easy batch Pro" app, or something with Retina Display resolution? I also resized them as small size like 600x400, but the image was totally broke, and apparently had different look when I saw the original via aperture. What should I do?

    What's the problem exactly?  Call and complain.  It's up to them on how they want to handle it, but if it's something normal or minor, they'll just fix the issue under warranty and send you on your way.  That's how warranty works.  In instances where a user has had repetative failure of the same kind or others with the same system, a complete replacement was done, but those were issues that border on the "it's a lemon" idea.

  • Image printing problem with Photoshop and Lightroom specifically with 11X14 cuts off top of image and moves bottom border up. Windows 7 OS - Epson Printer is working properly.

    Have an unprecedented problem with printing 11X14 photos in both PS and Lightroom. The printer is operataing properly. Printing 81/2X11 correctly. Have double and triple checked all the printing settings and they are correct. Have checked with friends to no avail. This problem started yesterday. Widows 7 OS. Need help.

    You show the OS receiving an image from Photoshop, and the OS starting the Epson print driver and handing it part of the image, the driver connects to the printer, then the print driver fails. It looks like a bug in the Epson rasterizer, or the printer communication.
    You really need to talk to Epson.  Photoshop isn't involved in that error.

  • Problems with the IDE controller

    I have a Macbook from 2008, I bought it in November 2008 so it is quite an old model I guess.
    I've never had a problem with it before and I have both Leopard and a Windows partition. The thing is that the other day I ran an antivirus at my Windows XP partition and now it doesn't detect the IDE controller. At the device manager I get a yellow exclamation mark and when I try to install it says that it doesn't exist. The thing is that I know that I had two devices for that but now there's only one and with the exclamation mark.
    Since that happened, the webcam doesn't work properly and the USB ports don't work properly as well, I need to keep restarting the computer to make them work. I don't know what to do since I don't have the Windows XP CD anymore and it's been like years without a problem til now and I'm so so worried since I have to switch OS from time to time because of my job.
    Can you please help me? If you need more info I will provide but please help...

    Yes it shows up in the bios and in the device manager in xp pro.
    No I didnt check for a bent pin on the board but I will and let you know.
    No it just started one day taking along time to access disk then i started getting bad block messages,
    then I changed the drive and still the same thing ,the changed the drive again and again and the cables two times
    and still the same thing.I dont know why I didnt think of checking the board for a bent pin,but I thank you
    for the idea.

  • Weird image distortion // Problem with game

    Hello,
    Im making a tiled based multiplayer game and everything is going fine however Im having a problem with image displaying.
    Here is how it looks like when I play it on my server computer as well as on my laptop:
    [http://s278.photobucket.com/albums/kk112/beloxx/?action=view&current=ss.jpg]
    And here is how it looks when I play it on my brother's computer:
    [http://s278.photobucket.com/albums/kk112/beloxx/?action=view&current=ss2.jpg]
    The image on the latter computer is distorted.
    I used to test my game on that computer before and everything was fine. I tried rebooting it but its still not displaying right. Right after I run the game the image is fine for a split second and then it becomes distorted...
    Did anyone have a similar problem?
    Here is the link to my home computer server:
    [http://belox.gotdns.com]
    or just go to:
    [http://74.56.212.14]
    The server may be slow or down so dont get frustrated if it take slong to load.
    Could you tell me whats your images look like when u run the game?
    Id really appreciate it if you helped me.

    Ok, the server is up and running right now so could you guys go to [ http://belox.gotdns.com| http://belox.gotdns.com] and see if your background image is distorted like in the screen shot above?
    Thanks

  • Image Capture problems with my MacBook

    When i plug in my camera macbook three different icons show up with it in finder and two different icons show up with it in image capture. my problem is that none of my pictures will show in my image capture. ive never had a problem with this before. please help

    when i plug my camer into my macbook*

  • Image Gallery, problems with Flash player 9 and Opera 9

    Hi, I'm developing a slideshow in flash (and php, JavaScript,
    XML).
    I'm coding in classes and AS2.
    I use the ExternalInterface class to communicate between
    swf's and html.
    The problem is that the Slideshow won't work properly in the
    Opera browser,
    it seems like it's working fine, but after a few click it
    stop responding.
    No problems in IE and FF.
    I've search and search to find a solution to this problem
    with no luck.
    I've put up an example of the slideshow here:
    http://www.coldminer.com/up/sw.php?thumbs=1
    The strange thing is that when I use really simplified
    versions of the code
    I'm using (with no externalInterface etc) it is working fine:
    http://www.coldminer.com/ftest/
    Anyone who have experienced similar problems, and can guide
    me to a solution.
    Opera version: 9.02 (8585)
    Flash player version: 9,0,16,0
    Thank you!
    ** Edit ->
    I found a solution, I replaced th ExternalInterface with the
    "Flash JavaScript Integration Kit",
    and all my problems with Opera was solved.

    Lo stesso problema ce l'ho io. Sembra che flash player 9 non
    riesca a leggere le versioni flash 5. Nell'installare un corso
    contenente flash 5 ho questo errore:
    Prodotto: Corso Multimediale per Photoshop 7 -- Errore 1904.
    Impossibile registrare il modulo C:\WINDOWS\system32\swflash.ocx.
    HRESULT -2147319780. Contattare il personale di supporto.

  • Photoshop CS5 - Image resize problem with move tool

    Hi People
    Here's my problem
    When I try to resize an layer using the move tool (as opposed to the Free Transform tool), while I'm in the process of moving the scaling handles, the bounding box reflects my movement but the layer preview stays at it's original size. When I stop moving the handles there is a few seconds delay and then the new scale size shows up. If I try to move the handles again, without commiting to the transform, the layer preview reverts back to it's original size until I've finished moving the handles.
    I didn't have this problem with CS4 and I've only recently upgraded. I work around this problem by using the proper Free Transform tool (ctrl+t) but it would be nice to know why the hell this happens. It seems to me to be more of a graphical glitch than a software preference but I thought I'd check just-in-case.
    Specs:
    Photoshop CS5 V12.1 x64
    PC
    Intel Xeon W3505 @2.53GHz
    Nvidia Quadro FX580
    12 GB RAM

    ace591 wrote:
    Hi People
    Here's my problem
    When I try to resize an layer using the move tool (as opposed to the Free Transform tool), while I'm in the process of moving the scaling handles, the bounding box reflects my movement but the layer preview stays at it's original size. When I stop moving the handles there is a few seconds delay and then the new scale size shows up. If I try to move the handles again, without commiting to the transform, the layer preview reverts back to it's original size until I've finished moving the handles.
    I also read you you tried updating your video dirvers and your syste crashed and you had to roll back.   Make sure you have downloaded the latest correct drivers. If that does not work try turning off Open GL in photoshops preferences.
    On my old XP 32 bit system CS5 movet tool with transform dialog does not fail like on your system. I can move the handles time and time again without commiting the transform. The only way to have Photoshop revert the transform back to the original state is to press the ESC key to cancel the uncommitted transform.

  • Displaying dynamically changing image: a problem with JLabel.

    Hello! I use NetBeans 5.5 and I develop my GUI with Matisse. I'm rather a beginner in developing GUIs with this editor...
    I'd like to display a dynamically changing image. The idea is: GUI shows the image, that is modified as some computations run in a different thread. App will be run on a single machine.
    I'm trying to display the image as a label's icon. The problem is that my app's frame can be resized - and when it is, the label also resizes. When the label is resized, the image should also be resized - the image should always be of the same size as the label. The problem? I noticed, that it works only when I make my app's bigger. When I try to lower its dimensions, the label's dimensions remain the same. Why the label don't make its size smaller?
    My code works as follows: when app's main frame is resize, the panel (the one, that the label is placed in) is also resized. And, since the label is in the panel, it (should) also be resized. So I wrote all the resize-events handlers (therefore I know that the resize event is sent when my app's frame is resized, and when the panel is resized - but the label is resized only when it grows bigger). In this methods I modify the image displayed in the label (I resize the image).
    Or, perhaps, there is some other way to show a (dynamically changing) image with Swing... I chose JLabel, because I didn't want to write my own JComponent. JLabel can display image and that is all I need. The problem is: when the label grows bigger, I create a new, bigger image (icon). Why my label don't get smaller (the resize event isn't even sent)?

    There is no component that dynamically resizes an image. You need to create your own. Something like this:
    JComponent component = new JComponent()
         protected void paintComponent(Graphics g)
              //  Scale image to size of component
              g.drawImage(yourImage, 0, 0, getWidth(), getHeight(), null);
    };

  • Problem with netbeans IDE

    hey! i am a learner of j2se 5.0 and am horrible at command line compiling. so i use netbeans IDE and well it has been doing excellently till now.
    recently i had a porblem with ImageIcons and i found the exact problem which i was having but with repect to applets , that is, the images were not displaying properly. i have managed to solve the problem as far as applets are concerned, but it is not so with applications.
    the thing is when i use the run function of the IDE, it displays all icons perfectly and its as if nothing is wrong.
    it creates a .jar file which when i separately click to execute by going to its folder, does so but does not display any images. In fact it executes and behaves in such a way that it's exactly as if i have not used icons in the program- it displays everything else. should i change some setting of the IDE? but if some setting is to be changed, y is it running normally when run from the IDE( F6 key).
    also when i used the command line (after some research to learn to use it) to extract all files from the .jar file, all the images were in it!!!as well as all the class files. so i can't even say that the IDE has not bundled up the images into the .jar file.
    could some1 please help??i need help with .jar files and not applets.

    first i deefined a method as shown in the Java tutorial
    ImageIcon icon =createImageIcon("lion.jpg","name");
    ( within the contructor of the class)
    then after completing the constructor for the class- (I am trying to display an ImageIcon on the background of a JFrame)
    i provided the following definition after the constructor and b4 the main method:
    protected static ImageIcon createImageIcon(String path,
    String description) {
    java.net.URL imgURL = LabelDemo.class.getResource(path);
    if (imgURL != null) {
    return new ImageIcon(imgURL, description);
    } else {
    System.err.println("Couldn't find file: " + path);
    return null;
    this is what i did-and when run from the IDE-it is perfect, but the jar file ggenerated when executed displays every single thing-all swing components e.t.c EXCEPT the image
    the image is in the same folder as the source file- i checked because if not, an error is indicated- so that is not the problem here.
    this same exact code works perfectly with applets and they execute perfectly both from the IDE and also when executed separately.
    the same problem also iccurs when trying to display on labels and buttons.(only for JFrames not for JApplets)
    the thing is in the java tutorial the method is given for applets and so my applets worked -so is there somethin i'm missing for frames- as far as i know they r very similar as far as usage is concerned.

  • Image Link Problem with Dreamweaver CS4?

    On my website, I have several images that link to other parts on my website. These work no problem when I preview the site, but after I test the links, the images that had those links have purple outlines that really clash with my website's design. Will users see this if they click on my links, and then return to the page? I'm using CS4 right now, and never recalled having this issue come up when using MX. Thanks for the help.

    I got stuck on this one too - not realising that Dreamweaver automatically palces a border on every image link - but the simplest way I found was to have my "Properties" panel showing on the bottom and input 0 into the "Border" box. By having this panel open you can see if you have accidently applied any styles to the image, where it links to, Image size attributes and the Image name.

  • Mail attachment image caching problem with C7

    Using C7-00 and Mail for Exchange with up to date software. I received two Mobile Boarding Pass emails from Lufthansa for my flights. These emails contain barcode.gif as an attachment that one can show at the gate when boarding. Now the two emails contain attachment with same name (barcode.gif) and the images are equal in size too. The problem is that for the second mail the phone shows the attachment of the first email!
    I have read that Symbian^3 has for performance reasons aggressive image caching feature. But in this case this causes a real nasty bug!
     - Juha

    I have found a solution.
    In the IMG src tag we had been using /images/gfx/image.gif
    By changing this to /./images/gfx/image.gif the images are no longer cached and update immediately when changed.
    PQ

  • Image scaling problem with object handles

    Hi,
    I am facing scaling problem.I am using custom actionscript component called editImage.EditImage consists imageHolder a flexsprite which holds
    image.Edit Image component is uing object handles to resize the image.I am applying mask to the base image which is loaded into imageholder.
    My requirement is when I scale the editImage only the mask image should be scaled not the base image.To achieve this I am using Invert matix .With this
    the base image is not scaled but it  is zoomed to its original size.But the base image should not zoomed and it should fit to the imageholder size always. When I scale the editImage only the mask image should scale.How to solve this.Please help .
    With thanks,
    Srinivas

    Hi Viki,
    I am scaling the mask image which is attached to imageHolder.When i  scale
    the image both the images are scaled.
    If u have time to find the below link:
    http://fainducomponents.s3.amazonaws.com/EditImageExample03.html
    u work with this component by masking the editImage.If u find any solution
    for scale only mask ,plz share the same.
    thanks,
    Srinivas

  • Spry Image Slideshow problems with IE?

    I have set up the Spry Image Slideshow widget and it works beautifully in Firefox and Chrome.  I'm having the same problems others have had.  I've read through the various discussions on here and have sorted some of them but am still stumped on a couple things!
    Here is the link to where I have it currently uploaded for testing purposes:  www.wohowebdesign.com/sidestrand/gallery.php
    My first problem was how the images just would not flow, skip all over and freeze.  After I changed the DOCTYPE, this problem was gone.
    My Second problem is now the images are blending ok, but when you go to use the controls to pause or click the arrows, a vertical line appears and does not go away. This is still occuring on my local computer tests, but the uploaded version seemed to work itself out... I have no idea how!!
    My third problem is the alignment of the whole gallery box will not line up properly on the page.  It is shifted to the right and this only happens when I view it in IE8 (not Firefox or Chrome).  Unfortunately most of our school uses IE8 so I need to have it working perfectly before I put the new site live.
    Any help or suggestions are greatly appreciated!
    Thank you,
    Debbie

    mdr4win wrote:
    i dont think you understood my question, wasnt about body background, but abut the spry image slideshow to work properly in IE
    I was not talking about body background, but about having markup that screws up your document when using a browser. Body background just happened to be there. Perhaps you would do well to have a look here http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Flittletreats.org%2F.
    I have noticed that you ignored my solution; your document still shows two bodies.
    Perhaps I should have mentioned that I tested in IE6 through to IE9 using IETester and the above was the only thing stopping IE from performing properly.
    How did you determine that the slideshow was not working correctly in IE and which versions of IE?
    Grumps

Maybe you are looking for

  • How do I get iTunes 11.2.2.3 to see my iPad mini?

    Since the last 2 iTunes updates, my PC (Windows 8.1) can see my iPad, but iTunes can't.  I've tried the suggestions on Apple Support, which resolved the issue for my iPods, but not for the iPad.

  • PC laptop works on one Airport, not another?

    My boss is having issues connecting his Fujitsu netbook. Here at our office, he connects with the Linksys router. At his office, his netbook connects fine with his Airport Extreme Base Station. At home, not so much. He gets an "Acquiring Network Addr

  • Cannot connect to broadband

    Hi I have a BT home hub 2 and have a lot of trouble connecting my laptop or phone to the wireless. Even when I have connected I get the limited connection message. Could any one help me to improve the connection? Regards. Alan

  • Unable to Save a PDF from Photoshop CS5 on OS 10.7 Lion

    Does anyone know how to resolve this issue?  When I attempt to File>Print>Printer Settings>PDF>Save as Adobe PDF - Photoshop crashes.  I can create a PDF from Microsoft Word, but not Photoshop.

  • How to close a apple store account

    how do you close a itunes account