Java Code:
public class Soft_Alphabets extends javax.swing.JApplet implements ActionListener {

    /** Initializes the applet Soft_Alphabets */
    SoftButton chars[] = new SoftButton[26];
    @Override
    public void init() {
        try {
            java.awt.EventQueue.invokeAndWait(new Runnable() {
                public void run() {
                    initComponents();
                    usr_initComponents();
                   
                   
                }
            });
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
private void usr_initComponents()
    {
      char c='A';
      String ch;
      Image img;
      AudioClip aud,askd;
      int i=0;
      ch=String.valueOf(c);
      int loc=0,loc1=0;
      while(c!='[')
      {
        ch=String.valueOf(c);
        img=getImage(getDocumentBase(),ch+".jpg");
        aud=getAudioClip(getDocumentBase(),ch+".wav") ;
        askd=getAudioClip(getDocumentBase(),ch+"ask.wav");
        chars[i]=new SoftButton(ch,img,aud,askd);
        getContentPane().add(chars[i]);
        chars[i].addActionListener(this);
        chars[i].setActionCommand(ch);
        if(c<='M')
        {
        chars[i++].setBounds(loc,0,60,60);
        loc=loc+60;
        }
        else
        {
            chars[i++].setBounds(loc1,60,60,60);
            loc1=loc1+60;
        }
        c=(char)(c + 1);
      }
    jLabel1.setForeground(Color.RED);
    }

public void setimage(SoftButton butt) 
{
         jLabel1.setIcon(new javax.swing.ImageIcon(butt.img));
}

    /** This method is called from within the init() method to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        getContentPane().setLayout(null);

        jLabel1.setText("Lebel1");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(140, 120, 210, 160);

        jLabel2.setText("HELLO AND WELCOME TO SOFT ALPHABETS");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(40, 280, 300, 20);
        jLabel2.getAccessibleContext().setAccessibleName("JLabel2");
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables

    public void actionPerformed(ActionEvent e) 
    {
        int i;
        for(i=0;i<26;i++)
        {
        if(chars[i].ch.equals(e.getActionCommand()))
        break;
        }
        ImageIcon icon=new ImageIcon(chars[i].ch+".JPEG");
        //ImageIcon icon=new ImageIcon(getCodeBase()+"Data/"+chars[i].ch+".JPEG");
        //ImageIcon icon=new ImageIcon((getCodeBase()+ chars[i].ch+".jpg").substring(5));
        //setimage(chars[i]);
        jLabel1.setIcon(icon);
        jLabel2.setText("You Pressed "+chars[i].ch);
        //jLabel1.setIcon(new javax.swing.ImageIcon((getCodeBase()+ chars[i].ch+".jpg").substring(5)));
        repaint();
        //chars[i].audio.play();
    }

}
1.The same code when used on Eclipse plays Audio but it dosen't in NetBeans and HTML

2.Also when I embed it in HTML No action is performed on click of a button which works well in NetBeans

3.Also I want to know How can I update images in JLabel if possible can somebody provide me with snippet