Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Images

 
P Jain
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

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 ).
 
Pat Hays
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic