To get a jpg or any image

Hello,
Can any one help me in telling how to get a jpg or any image in a JFrame and laos one more thing can I change the cup icon to my own icon is it possible if so can you give me a small example or method to do it.
Regards,
Sreedhar

hmmm.... really try to use the [url http://onesearch.sun.com/search/onesearch/index.jsp?qt=image+in+jframe&subCat=&site=dev&qp=&chooseCat=javaall&col=developer-forums]search tool...
As for the icon itself...
javax.swing.ImageIcon icon = new javax.swing.ImageIcon(somePathString);
//note that java understands giff and jpg as standard
myFrame.setIcon(icon.getImage());:)

Similar Messages

  • Worst webbrowser in the history of web browsers. I cannot get FF to load any images. I have tried everything. Help or no longer using this browser.

    FF just opens a black text type of webpage. Just Fing horrible. Everyone says to use you, but it's just a nightmare. Shitty. Sorry, all I seem to do Is F with browsers and anything related to FF. I stopped using FF 8 years ago and it seems as I was correct! JUNK! Can someone help me regarding just to get images from the GD internet to load? Simple, shouldn't have to go through a 45 step process to get this to work. Help or not. Not impressed at all.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can check more:
    *http://kb.mozillazine.org/Images_or_animations_do_not_load
    *https://support.mozilla.org/kb/Images+or+animations+do+not+show
    If images are missing then check that you do not block images from some domains.
    *Tap the Alt key or press F10 to show the Menu Bar
    Check the permissions for the domain in the currently selected tab in "Tools > Page Info > Permissions"
    Check "Tools > Page Info > Media" for blocked images
    *Select the first image link and use the cursor Down key to scroll through the list.
    *If an image in the list is grayed and "<i>Block Images from...</i>" has a checkmark then remove this checkmark to unblock images from this domain.
    Make sure that you do not block (third-party) images, the <b>permissions.default.image</b> pref on the <b>about:config</b> page should be 1.
    See also:
    *http://kb.mozillazine.org/Websites_look_wrong

  • When I download photos from a flash drive,everything is fine and they show in Events and Pictures, but when I click on the individual pic I get an error message saying that it cannot locate the JPG. Any thoughts?

    When I download photos from a flash drive,everything is fine and they show in Events and Pictures, but when I click on the individual pic I get an error message saying that it cannot locate the JPG. Any thoughts?

    It sounds like your iPhoto Advanced preferences are set to not copy photos during import, i.e. a Referenced library:
    Check your Advanced preferences to see if that's the case. If it is the best solution would be to select the checkbox to copy the photos and reimport the photos from the flash drive.  Then check the new import. It it was OK you can delete the previous event with the "missing" photos.
    OT

  • When I try to open images I am getting this message: "The file "image.jpg" couldn't be opened because you don't have permission to view it." "Which I've tried - but it's not responding, plus its with all images now. Can anyone help?

    When I try to open images I am getting this message: "The file “image.jpg” couldn’t be opened because you don’t have permission to view it." "Which I've tried - but it's not responding, plus its with all images now. Can anyone help?

    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.iBooksX
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Quit the application if it's running. Move the selected item to the Trash. Relaunch the application and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • When i save any image from any website then there is no option showing in the save as box like saves as .jpg etc. In this case I manually add the extension of image for example .jpg .gif etc. Please solve my problem :(

    When i save any image from any website then there is no option showing in the save as box like saves as .jpg etc. In this case I manually add the extension of image for example .jpg .gif etc. Please solve my problem :(

    I'm guessing your problem is caused by code validation errors: orphaned division tags for example, or mismatched code and document type (i.e.  XHTML /> mixed with HTML > style closures).
    Start by using the code validation tools below and fix any reported.  You'll need an Internet connection for this:
    HTML Validator - http://validator.w3.org 
    CSS Validator - http://jigsaw.w3.org/css-validator/  
    HTML & CSS Tutorials - http://w3schools.com/
    If this doesn't solve the problem, you will need to post a URL to your live page so we can see your code and images working together.   Or at the very least copy and paste your HTML and CSS code into a reply using double arrows >> Syntax Highlighting > Plain.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • I'm trying to convert a PDF to Word, but it won't copy signatures over, just get gobblygook... any way I can convert with an image of the signatures?

    I'm trying to convert a PDF to Word, but it won't copy signatures over, just get gobblygook... any way I can convert with an image of the signatures? I tried Word, RTF etc but they all come out the same. Help!

    Hi newromancer65,
    Would you send your document as an email attachment? 
    I will check it from my end.Please add the link to this forum post for reference.
    I have sent you my contact details on your email id.
    Regards,
    Florence

  • TextArea alpha gets wrongly applied to any htmltext images

    If I set the alpha property of a textarea, the alpha gets
    wrongly applied to any htmltext images also. How can I work around
    this?

    Curtis,
    I believe you can assign a style sheet to a TextArea control
    using the TextArea class's "styleSheet" property (see
    http://livedocs.adobe.com/labs/flex3/langref/mx/controls/TextArea.html#styleSheet).
    Peter

  • When using fireshot, my extensions are duplicating. I get a .jpg.jpg on every image downloaded

    When using fireshot, my extensions are duplicating. I get a .jpg.jpg on every image downloaded

    Try Fireshot support for help with their software. <br />
    http://screenshot-program.com/fireshot/ <br />
    http://screenshot-program.com/sup/index.php?a=vforum&f=12

  • I downloaded the web developer tool bar and after using it my images are gone. I use google and a home page and the big google is gone. I uninstalled firefox and reinstalled it but I still don't have any images. How can I get them back?

    Two days ago I downloaded the web developer tool bar (aus2.mozilla.com). I tried to use it but gave up. I deleted the tool bar.
    I don't have any images anymore. I use Google.com as my home page (default) and the large GOOGLE isn't there anymore. I've also noticed some of the sites I use don't have the continue or next or enter keys anymore. It seems the only thing I have now is the text.

    Are you sure you are looking at the Google page?? In Firefox 4.0 the default homepage / Start Page in Firefox was changed to '''about:home''' which looks a lot like the former www.google.com/firefox homepage.

  • How to Get a Video Thumbnail preview image in sharepoint Asset Library

    namespace ConsoleApplication3
    class Program
    static void Main(string[] args)
    using (var site = new SPSite("http://contoso/sites/teams"))
    using (var web = site.OpenWeb())
    var list = web.Lists.TryGetList("Videos");
    var videoProperties = new Dictionary<string, object>();
    videoProperties["Keywords"] = "Intranet Video";
    //videoProperties["AlternateThumbnailUrl"] = "/_layouts/images/preview.jpg";
    UploadVideo(list, @"C:\Downloads\Video3.mp4", videoProperties);
    public static void UploadVideo(SPList list,string fileName,IDict ionary<string,object> properties)
    SPFile file;
    using (var fileStream = File.OpenRead(fileName))
    var urlOfFile = SPUrlUtility.CombineUrl(list.RootFolder.ServerRelativeUrl, Path.GetFileName(fileName));
    file = list.RootFolder.Files.Add(urlOfFile, fileStream, true);
    list.Update();
    //listid = list.ID.add();
    SPListItem listItem = list.GetItemById(file.ListItemAllFields.ID);
    //SPListItem listItem = list.GetItems("Video3");
    var videoContentType = list.ParentWeb.Site.RootWeb.AvailableContentTypes["Video"];
    // listItem["ContentTypeId"] = videoContentType.Id;
    foreach (var property in properties)
    listItem[property.Key] = property.Value;
    listItem.Update();
    in this code "SPListItem listItem = list.GetItemById(file.ListItemAllFields.ID); " im getting null reference exception.an i have tried with other line "var listItem = file.ListItemAllFields;" same error.any one help me to get solve this
    issue.And how to Get a uploaded video Thumnail image.

    Hi,
    I did a test with your code in my environment and it works fine.
    For a better troubleshooting, I suggest you debug your code step by step. You may need to check if file.ListItemAllFields.ID is valid.
    If you want to get video Thumnail image, there is a column named Preview Image URL, the internal name of the field is AlternateThumbnailUrl.
    You can get the field value using Sever Object Model like below.
    String url = item[“AlternateThumbnailUrl”].ToString();
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/en-US/251974d8-18ac-4ff9-88a2-633b5bd80fce/get-asset-library-column-value-preview-image-url-programmatically?forum=sharepointgeneralprevious
    More information about how to get list item using Server Object Model:
    http://msdn.microsoft.com/en-us/library/office/ms460897%28v=office.14%29.aspx
    Best regards,
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • How JPG or GIF Image open in MIDP?

    How my j2me application can support jpg or gif image format. I have tested png file in midp 1.0 and its not support other than png format( im not sure about midp 2.0 does it support or not). I have seen lot of mobiles those support gif and jpg file formats. Does j2me applications on those mobile can support other image formats?
    Plus it is possible that i can develop my own decoder for jpg or gif format. I know it possible, but im talking related to its processing power consumption. Or is there any third party api exist to support jpg or gif file format on midp. Please r

    Here is the code snap that read image from a URL.. I have tested this code on localhost & two different pc on lan in emulator.. but not in actuall mobile... but i hope it will work...
    Image image = null ;
    DataInputStream httpInput = null ;
    DataOutputStream httpOutput = null ;
    HttpConnection httpCon = null ;
    String url = "http://localhost:8080/images/picture.png"
    try
    httpCon = (HttpConnection)Connector.open(url);
    int bufferSize = 512 ;
         byte byteInput[] = new byte[bufferSize] ;
         ByteArrayOutputStream imageBuffer = new ByteArrayOutputStream(1024*50);
         httpInput = new DataInputStream( httpCon.openInputStream() );
                   System.out.println("Http-Input Connecting Establish Successfully");
                   httpOutput = new DataOutputStream( httpCon.openOutputStream() );
                   System.out.println("Http-Output Establish Successfully");
    int size = 0 ;
    // read all image data ....
         while ( ( size = httpInput.read( byteInput , 0 , bufferSize ) ) != -1 )
                        imageBuffer.write( byteInput , 0 , size ) ;
    // get byte from buffer stream
              byte byteImage[] = imageBuffer.toByteArray();
                   System.out.println("read byte " + byteImage.length );
         // convert byte to image ...
         image = Image.createImage( byteImage , 0 , byteImage.length );
         return image ;
         //return null ;
    catch( IOException e )
                   System.out.println("\nUnable to Perform Image IO Operation with Host");
         return null ;
    ....................................

  • Export PDF, JPG or PNG images from the mapviewer

    hi,
    I need to export PDF, JPG or PNG images from the mapviewer (Oracle Map client).
    How Can I do it?
    Any Ideas?
    Thanks.

    What I do with xml after calling getMapAsXML function
    Any example?There is a request page in the mapviever configuration webpages, there you can send it to the server and get the image in return.
    or you can write your own programm to send it to the mapviewer servlet using post and progress the response by yourself. Have a look at the mapviewer documentation pdf, there are some examples on the different possible different xml requests.

  • How to save or save a drawing in a PNG or any Image file format ?

    Hi,
    I am working on a signature capturing application using J2ME MIDP 2.0 for Palm Treo 750 with Windows Mobile 6.0
    I am taking signatures as a drawing on a CustomItem.
    Now, i want to send it to a php script running on Apache server to save this signature as a PNG, jpeg or any image file at server end.
    or how can i save this drawing on my local file system as a png or any other type of image file.
    Plz help if anybody knows the right way....
    Thanks.

    Hi Hithayath,
    Thnx for the reply.
    Actually, i hv no problem in storing a data locally or sending it on a web server. The problem in related with the formats.
    I mean, how can we create a png or jpg file using the raw bytes of an image drawn on a canvas or CustomItem.. ?
    We can get the integer array of RGB points using getRGB() method of image object. Now, if i will write this data after converting to binary in a file then that file
    will show a message like "Preview not available". It means the format is not recognized.
    So, my question is how can we convert this raw data in a png or jpg format so it can be displayed on a web page or stored in a png or jpg file..?
    I think now u can better understand the problem.
    Waiting for the reply....
    Thanks. :)

  • Open any image

    Hi,
    I found some code to open JPGs, but I need to be able to open any image file (or at least both JPG and GIF)... Could anyone please give me some help with this?
    FileInputStream fis = new FileInputStream(chooser.getSelectedFile());
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(fis);
    img = decoder.decodeAsBufferedImage();
    fis.close();
    Thanks!!!

    A quick and easy way to load images of multiple types (png, jpg, gif etc) is to use the following code:
    Image image;
    image = Toolkit.getDefaultToolkit().getImage(new URL("file:someimage.png"));
    In order for this to work, the image that you want to load has to be in the same directory as the class file that you are running. If the image is somewhere else, such as on the Internet or somewhere else on your harddrive, then simply modify the new URL() portion of the code to reflect the location of your image. If you need to make sure that the image has completely loaded before using it, such as if you want to get its width and height through code, then you would also attach a MediaTracker object to it, like the following:
    Image image;
    MediaTracker tracker;
    image = Toolkit.getDefaultToolkit().getImage(new URL("file:someimage.png"));
    tracker = new MediaTracker(this); //The "this" should be something such as the canvas you're using
    tracker.addImage(image, 0);
    tracker.waitForAll(); //Wait for image to finish loading
    Hope that helps.

  • Any image modifications cause multi-colored bars to appear

    This one is as strange as they come. . .
    Taking any image (jpg, tiff) and using the smudge tool on it or resizing it will cause repeating multi-colored bars to start appearing inside of the image.
    I thought maybe it was just a video card/drawing problem, but it actually gets saved inside of the image.
    It's kinda strange, because my MPEG playback has been doing something similar, but I can kill that by reducing video card acceleration. This doesn't go away though.
    I've uninstalled, reinstalled -- even upgraded to CS2. Problem still exists. Could it actually be my video card drivers? (nvidia nforce from Oct 7th, 2007)

    Problem solved, though it's hard to believe.
    This problem has actually been going on for at least 2 years on this computer, and finally just now the right clue came in as a BSOD, naming my sound card driver as the culprit.
    Sure enough, I updated my Nvidia sound card driver and I've been running smooth now for a week without a hiccup from this problem.
    I can only theorize that the sound card driver was overwriting memory space belonging to the video card driver . . . or something to that effect.

Maybe you are looking for

  • Why can't I access the received variables??

    Hello, I created a new partner link which has an operation which transmits a complex variable type (3 strings, 2 ints). If I add a RECEIVE to my bpel process, I can create an input variable. The problem is, that I want to access the data (of the data

  • [svn:fx-trunk] 11999: Fixed: ASC-3889 - Using setting in a for loop causes Verify error

    Revision: 11999 Revision: 11999 Author:   [email protected] Date:     2009-11-19 11:37:09 -0800 (Thu, 19 Nov 2009) Log Message: Fixed: ASC-3889 - Using setting in a for loop causes Verify error Notes: emit pop after callstatic to a void function to b

  • Can apple repair the dents and scratches on my iPod/

    I have an iPod touch 5th generation and after a couple of uses, i notice light scratches on my screen. Also, i accidentally dropped it a few times so it has a few dents on the corners. i was wondering if Apple could do anything to repair it and if so

  • How?: file transfers to wifi ipad

    Does the iPad support Bonjour or one of the dropclients to get my pdf files from my iMac to the iPad? If I go for the iPad with wifi, & I need to transfer my pdf documents to the iPad on the go...

  • Programming exit tabpage

    Hi all, I have a requirement to implement some coding in a 'Program Exit' tab page in a Activity Step, and for some reason, I have to call a RFC function in this  area, like below: call function 'XXX' starting new TASK l_task    exporting And I found