Results 1 to 2 of 2
  1. #1
    iswan is offline Member
    Join Date
    Sep 2011
    Rep Power

    Default Error: cannot load image .

    Hai , i have a probleam to load image . I am doing my homework using java applet. After i double the ImageLoad.html it still dont appear anything .Here is my code and please correct my code if it not suitable


    import java.applet.*;
    import java.awt.*;

    public class ImageLoad extends java.applet.Applet {

    Image img;
    public void init()
    img = getImage(getDocumentBase(), getParameter("image"));

    public void paint(Graphics g)

    /* ImageLoad.html*/
    <applet code = ImageLoad.class width =248 height= 146>
    <param name ="img" value =" 380025BungaRaya.gif">

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Error: cannot load image .

    Are there any error messages in the browser's java console?
    Split your compound statements into single statements and print out the values returned by each individual statement to see if they are all working as you expect.

Similar Threads

  1. How to load an image using Toolkit
    By pappyj77 in forum AWT / Swing
    Replies: 7
    Last Post: 07-25-2011, 01:16 PM
  2. Load and Draw image
    By TheSheepeh in forum New To Java
    Replies: 2
    Last Post: 03-19-2011, 12:19 PM
  3. Can not load image in SWT/Eclipse
    By janice in forum SWT / JFace
    Replies: 4
    Last Post: 10-03-2008, 04:53 PM
  4. [SOLVED] Load image into a JSP
    By jazz2k8 in forum New To Java
    Replies: 0
    Last Post: 05-08-2008, 11:33 AM
  5. Help with load image
    By trill in forum New To Java
    Replies: 1
    Last Post: 08-01-2007, 07:16 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