1. What's the best way to getImage()? coderanch.comI'm having some trouble figuring out what is the best, most reliable, cross-platform method of getting a handle on an Image object from the local filesystem. I'm noticing some confusing methods in the API but have worked around them and have something working on a Wintel platform but I want to make it as platform-agnostic as possible. Two (2) methods exist ... |
2. Toolkit.getImage() coderanch.com |
3. getImage() method? coderanch.comHello, everyone. Here is the code from an example on the API. I want to know where is the method getImage() inherited from ( I put comments on that line of codes ). import java.applet.Applet; import java.awt.Color; import java.awt.Image; import java.awt.Graphics; import java.awt.MediaTracker; public class ImageBlaster extends Applet implements Runnable { MediaTracker tracker; Image bg; Image anim[] = new Image[5]; int ... |
4. HELP: getImage(url) stopped working (was okay)? coderanch.comHi, all. I've been using this piece of code successfully, with only minor variations. Basically an applet passes two parameters of type (URL, string) to a helper class. Then on this particular variation of the code, I got this error: DetailFrame : cannot resolve symbol symbol : method getImage (java.net.URL,java.lang.String) location : class DetailFrame.CustomTextField picture = getImage(url, "coyimages/horse.gif"); and here is ... |
5. Potential problems with getImage() coderanch.comHi there, I get my images using... Image image=new ImageIcon(path).getImage(); But I'm thinking, what happens when the image at the location 'path' is not there. Well, I expected the image to be null, but when I tried it: sun.awt.windows.WImage@15983b7 Which isn't null. So what happens if I now try to use the image, could I get an exception? I tried it, ... |