This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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