How to add a picture from internet in my application

Posted on 2005-04-05
Last Modified: 2010-03-31

I want to add a picture from a URL in my application, lets say is this one:
How can I do it? any example?
thank you!!
Question by:ximotur
    LVL 15

    Assisted Solution

    Toolkit.getDefaultToolkit() .createImage(new URL(""))
    LVL 15

    Expert Comment

    To draw the image:
    But have a look at:
    to pick the action you want to take.
    LVL 92

    Accepted Solution

    create a label to display the image and add that label to your image hierarchy where required.

    JLabel label = new JLabel(new ImageIcon(new URL("")));


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now