currently using JBuilder Foundations
task is to display a .gif file in JApplet from my hardrive
the URL is C:\MAGIX
Should the image file be located elsewhere in a specific place?
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Applet1 extends JApplet {
public void init(){
Container contentPane=getContentPane();
ImageIcon icon=new ImageIcon("icon.gif");
JLabel jl=new JLabel("icon",icon,JLabel.CENTER);
contentPane.add(jl);
}
}
when running the JApplet, only prints "icon"