The moose likes Swing / AWT / SWT and the fly likes Creating Images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Creating Images" Watch "Creating Images" New topic

Creating Images

P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52

I have a jar file which contains some images.
I have some texts and image names (which are present in jar file) and there coordinates.
Can I create a image file that contains text and images (from jar file) at specific coordinates ( I mean by extracting specific images from the jar file ).

Regards<br />P Jain
Pat Hays
Ranch Hand

Joined: Aug 20, 2004
Posts: 138
Do you mean how to load image from jar file? if so, the code is here.

ImageURL = "/pictures/logo.gif";
button = new JLabel(new ImageIcon(getClass().getResource(ImageURL)));//For load image from the jar file.

Download Java GUI Builder, <a href="http://www.mars3000.com" target="_blank" rel="nofollow">http://www.mars3000.com</a>
It is sorta covered in the JavaRanch Style Guide.
subject: Creating Images
Similar Threads
jar file probelm
path trouble
Jar File Creation Destroys Images in Maven2
executable jar file
Image is not getting loaded in applet