This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem with load image file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem with load image file" Watch "problem with load image file" New topic
Author

problem with load image file

Alex Florentino
Ranch Hand

Joined: Dec 12, 2006
Posts: 48
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

Joined: Jan 14, 2004
Posts: 1535
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

Joined: Dec 12, 2006
Posts: 48
the issue was image, I change image and works.
 
Consider Paul's rocket mass heater.
 
subject: problem with load image file
 
It's not a secret anymore!