Hi All,

Sorry for the Swing Question!

I have theCheckread or Filepermission error when I tried to run my JApplet -

ImageIcon can't read "100_Java.gif" file. My code is as follows:



import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;

import java.io.*;


public class DE_Main extends JApplet {

public Icon javalogo   = new ImageIcon("100_JAVA1.gif"); /// File permission error here
public Icon itelogo    = new ImageIcon("itelogoIcon.gif");
public Icon imageIcon1 = new ImageIcon("coins.jpg");
public Icon imageIcon2 = new ImageIcon("itelogoIS.gif");


        public DE_Main() { // Constructor

        // this is left blank intensionally

        }



        public void init () {



                // Force SwingApplet to come up in the System L&F
                String laf = UIManager.getSystemLookAndFeelClassName();
                try {
                    UIManager.setLookAndFeel(laf);
                    // If you want the Cross Platform L&F instead, comment out the 
above line and
                    // uncomment the following:
                    // 
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
                } catch (UnsupportedLookAndFeelException exc) {
                    System.err.println("Warning: UnsupportedLookAndFeel: " + laf);
                } catch (Exception exc) {
                    System.err.println("Error loading " + laf + ": " + exc);
                }

    /*    getContentPane().setLayout(new FlowLayout());
        button = new JButton("Hello, I'm a Swing Button!");
        getContentPane().add(button);
    }*/


                // setting up the Layout of JContentPane in JApplet

                getContentPane().setLayout(null);
                getContentPane().setBackground(new java.awt.Color(121,132,134));
                setSize(444,511);


                ImageCoin.setIcon(imageIcon1);
                ITECaption.setIcon(imageIcon2);
                JavaLogo.setIcon(javalogo);

            showStatus("Button Pane added");
            //c.add(disposeb);
      //c.setVisible(true);
        } // end of init()

  public void start() {
      addItem("starting... ");
  }
  public void stop() {
      addItem("stopping... ");
  }

  public void destroy() {
      addItem("preparing for unloading...");
  }



}


_______________________________________
Rewards for everyday Internet use

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to