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

problem with load image file

 
Alex Florentino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the problem with this code ? I need load image file(java.awt.Image) the image be in local machine:



thanks
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used an image file located in the current directory and your code loaded it okay.
I got this output in the console:

If the image file is not in the current directory then there are some other things
we can do to load it.
 
Alex Florentino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the issue was image, I change image and works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic