This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Problem Loading Image in Applet 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 "Problem Loading Image in Applet" Watch "Problem Loading Image in Applet" New topic
Author

Problem Loading Image in Applet

Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262
Howdy all,
I've run into a snag with a pretty trivial applet. The applet adds an extended Canvas, whose constructor loads an image. My code works just fine under Win NT and appletviewer - the canvas draws the image as expected.
The problem I encounter is with Win 98. When I load the applet on that platform, the canvas only draws the upper left portion of the image. Does any one know of a fix I can use to get arround this problem for Win 98?
The constructor code that I use is below:

Any suggestions would really be appreciated.


Fun programming etcetera!
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

You're running the applet in Windows 98 under AppletViewer, too, right? Not a web browser? Are the same versions of Java installed? And what type and size of image are you trying to load?

Maybe also post the actual code where the canvas is painting the image...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262
I've tried to run it in both appletviewer and IE on Win98; I get the same result with either. More complete code follows:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem Loading Image in Applet
 
Similar Threads
MediaTracker problem
Useless arguments in AWT
Images
haveing trouble with applet animation plz help
placing images in applets