Java (applet) Images
From the init section of the code:
ball_image = getImage(getCodeBase(), "red_ball.gif");
System.out.println(ball_image.getWidth(t his));
System.out.println(ball_image.getHeight(t his));
It always prints -1 and -1, what's up with that? The image paints just fine but it's not reporting the size. Unless I'm just forgetting something important about doing images ...
ball_image = getImage(getCodeBase(), "red_ball.gif");
System.out.println(ball_image.getWidth(t
System.out.println(ball_image.getHeight(t
It always prints -1 and -1, what's up with that? The image paints just fine but it's not reporting the size. Unless I'm just forgetting something important about doing images ...
