🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1211

Re: Downloading image from remote host

#1211
From: John McGrath TeamB
Date: Wed, 10 Apr 2002 21:30
22 lines
1638 bytes
On Tue, 9 Apr 2002 19:29:51 +0200, Richard KS wrote:

> Anyone who could direct me to any source, snippet or resource that helps
> with the download of an image from a remote place? For instace, downloading
> image http://host/jpeg.jpg and display it?

You do not really have to do worry much about downloading the image.  
That happens pretty automatically.  Exactly which code you use depends 
on what you want to do with it.  Assuming you are using Swing, you 
could use a JLabel to display it:

   Icon icon = new ImageIcon( new URL( "http://host/jpeg.jpg") );
   JLabel label = new JLabel( icon );

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.171e78e1a1c676f698b523@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.gamma.ru!Gamma.RU!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3cb32508_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,5da360fccec93b15
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-04-10 14:39:30 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: Downloading image from remote host
Date: Wed, 10 Apr 2002 17:30:02 -0400
Message-ID: <MPG.171e78e1a1c676f698b523@newsgroups.borland.com>
References: <3cb32508_1@dnews>
X-Newsreader: MicroPlanet Gravity v2.60
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 1018474201 209.92.40.60 (10 Apr 2002 14:30:01 -0700)
Lines: 22
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.gamma.ru!Gamma.RU!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews