Article View: borland.public.jbuilder.java.language
Article #8583Re: java and images
From: Paul Furbacher [TeamB]
Date: Fri, 09 Mar 2001 15:41
Date: Fri, 09 Mar 2001 15:41
30 lines
2253 bytes
2253 bytes
Neil Wood wrote: Technically, since this is an applet question, you should have asked it in the "applet-issues" newsgroup. > I have to create a simple applet that loads a file of images and displays > one of the images within the whole applet. The image shown is determined by > the position of the mouse across the applet. > > What will be the easiest way to pull this off and what sort of image files > do you think I should use. Certainly, you wouldn't put all of the images into a single file ... or would you? It seems to me that you would simply store the images in separate GIF or JPG files in your archive, add a mouse listener to the applet which determines where the mouse is in your "image change map", and get the image (doing this has been discussed lots of times in the "applet-issues" newsgroup, so do a search) and paint it when the time is right. Another strategy would be to cache all the images (hopefully, you don't have that many, and the images themselves aren't too big) and take the images from the cache. If you have the Pro or Ent versions, the JBCL has a class called ImageLoader, which I think did some kind of caching. Paul Furbacher (TeamB) - Please send responses to newsgroups only. Thank you.
Technical Details
Message-ID:
<3AA8F99E.1B05F1B9@mac.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!nmaster.kpnqwest.net!blackbush.xlink.net!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!24.9.87.144References:
<3aa8a26a$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,1df4ba8e2108b4b
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-09 07:44:46 PST
Message-ID: <3AA8F99E.1B05F1B9@mac.com>
Date: Fri, 09 Mar 2001 10:41:18 -0500
From: "Paul Furbacher [TeamB]" <pfurbacher@mac.com>
Reply-To: pfurbacher@mac.com
Organization: Reverse Alchemy, Inc.
X-Mailer: Mozilla 4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: java and images
References: <3aa8a26a$1_1@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.9.87.144
X-Trace: 9 Mar 2001 07:40:44 -0800, 24.9.87.144
Lines: 30
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!nmaster.kpnqwest.net!blackbush.xlink.net!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!24.9.87.144