Search:

Type: Posts; User: samanesh

Search: Search took 0.32 seconds.

  1. Replies
    12
    Views
    1,321

    [SOLVED] Re: can't get Image size.

    thank you, this fixed my problem.
    the reason i use Applet is that I've never before heard of JApplet... ill check it out.
  2. Replies
    12
    Views
    1,321

    [SOLVED] Re: can't get Image size.

    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...
  3. Replies
    12
    Views
    1,321

    [SOLVED] Re: can't get Image size.

    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.*;
  4. Replies
    12
    Views
    1,321

    [SOLVED] Re: can't get Image size.

    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.*;
  5. Replies
    12
    Views
    1,321

    [SOLVED] Re: can't get Image size.

    this is the code (i think) that matters


    public class mainapplet {
    public static mainapplet home;
    mask testmask;
    public void init(){
    home = this;
    ...
  6. Replies
    12
    Views
    1,321

    [SOLVED] Re: can't get Image size.

    I've tried my applet class, wich I use for drawing the images, and null, but both return -1.
  7. Replies
    12
    Views
    1,321

    [SOLVED] can't get Image size.

    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...
Results 1 to 7 of 7