Results 1 to 3 of 3
  1. #1
    Ranu is offline Member
    Join Date
    Jun 2010
    Posts
    13
    Rep Power
    0

    Default Images in applet

    how to include images in applets???
    I have tried this:


    Image image; public void init() {
    image = getImage(getDocumentBase(), "http://hostname/image.gif");
    }
    public void paint(Graphics g) {
    g.drawImage(image, 0, 0, this);
    }

    But nothing is showing in applet.Why?

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,548
    Rep Power
    23

    Default

    Are there any error messages in the browser's Java console?

  3. #3
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    Is the host is an applet native-host?
    If my answer helped you. Please click my "REP" button and add a comment
    Have a Good Java Coding :)

Similar Threads

  1. Putting Applet on web with images
    By Peetahzee in forum New To Java
    Replies: 1
    Last Post: 04-18-2010, 08:35 PM
  2. [Applet] Clicking images & moving them.
    By Perfectworld in forum Java Applets
    Replies: 17
    Last Post: 01-16-2010, 08:09 AM
  3. Extract images from Java applet
    By User01 in forum Java Applets
    Replies: 2
    Last Post: 12-23-2009, 06:44 AM
  4. Applet with Images in Browser
    By baron in forum Eclipse
    Replies: 0
    Last Post: 09-20-2009, 10:06 PM
  5. Replies: 4
    Last Post: 06-08-2007, 06:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •