Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25541 > unrolled thread

Images out of a jar

Started bySam Takoy <sam.takoy@yahoo.com>
First post2011-01-28 21:01 -0500
Last post2011-01-28 21:36 -0500
Articles 3 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Images out of a jar Sam Takoy <sam.takoy@yahoo.com> - 2011-01-28 21:01 -0500
    Re: Images out of a jar Roedy Green <see_website@mindprod.com.invalid> - 2011-01-29 14:19 -0800
    Re: Images out of a jar Arne Vajhøj <arne@vajhoej.dk> - 2011-01-28 21:36 -0500

#25541 — Images out of a jar

FromSam Takoy <sam.takoy@yahoo.com>
Date2011-01-28 21:01 -0500
SubjectImages out of a jar
Message-ID<ihvsei$a57$1@news.eternal-september.org>
Hi,

Can someone point to a source where it is explained how to add image 
files to a jar and then use them in an applet. I'm not able to find the 
info regarding where to put the image within the jar and then how to 
extract it later.

Many thanks in advance,

Sam

[toc] | [next] | [standalone]


#26128

FromRoedy Green <see_website@mindprod.com.invalid>
Date2011-01-29 14:19 -0800
Message-ID<dj49k618ntd32kt7q9n2t3u47fm0dti340@4ax.com>
In reply to#25541
On Fri, 28 Jan 2011 21:01:52 -0500, Sam Takoy <sam.takoy@yahoo.com>
wrote, quoted or indirectly quoted someone who said :

>Can someone point to a source where it is explained how to add image 
>files to a jar and then use them in an applet. I'm not able to find the 
>info regarding where to put the image within the jar and then how to 
>extract it later.

see http://mindprod.com/jgloss/image.html
http://mindprod.com/jgloss/resource.html
http://mindprod.com/jgloss/ant.html
http://mindprod.com/jgloss/jarexe.html
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.

[toc] | [prev] | [next] | [standalone]


#26204

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-01-28 21:36 -0500
Message-ID<4d437d24$0$23752$14726298@news.sunsite.dk>
In reply to#25541
On 28-01-2011 21:01, Sam Takoy wrote:
> Can someone point to a source where it is explained how to add image
> files to a jar and then use them in an applet. I'm not able to find the
> info regarding where to put the image within the jar and then how to
> extract it later.

They can be anywhere but maybe something like:
    images/foobar.jpg
would be logical.

new ImageIcon(getClass().getResource("images/foobar.jpg"))

should get the image in a form that be used by Swing controls.

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web