thank you, this fixed my problem.
the reason i use Applet is that I've never before heard of JApplet... ill check it out.
Type: Posts; User: samanesh
thank you, this fixed my problem.
the reason i use Applet is that I've never before heard of JApplet... ill check it out.
yes, i was still expirimenting with how to get Graphics to paint outside the paint method. This is my first java programming, so it sure has some things that can be improved. About the size: these...
right, sorry.
you will need a folder "Images" with 1 png Image in it for it to run.
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.io.*;
OK, ill just copy and paste my entire code
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.net.*;
import java.io.*;
this is the code (i think) that matters
public class mainapplet {
public static mainapplet home;
mask testmask;
public void init(){
home = this;
...
I've tried my applet class, wich I use for drawing the images, and null, but both return -1.
I'm making an applet game and it would be nice to get the width and height of an image,
but for some reason the function getWidth(ImageObserver) as well as getHeight(ImageObserver) always return -1...