I am Using the Dialog class in theApplet to give some message. for that i am doing like this import java.awt.*; import java.awt.event.*; import java.applet.*;
public class MyApp extends Applet implements ActionListener { private java.awt.Button OkBut = null; private java.awt.Label lblMessage =null; private java.awt.Panel MessagePane = null; private java.awt.Dialog AppletDlg = null; Button b; public void init(){ setLayout(null); b = new Button("Click me"); b.setBounds(100,100,100,25); b.addActionListener(this); add(b); getOkBut().addActionListener(this); } public void actionPerformed(ActionEvent ae){ if(ae.getSource() == b){ getDialog().show(); } if(ae.getSource() == getOkBut()){ getDialog().dispose(); }
private java.awt.Panel getContentsPane() { if (MessagePane == null) { try { MessagePane = new java.awt.Panel(); MessagePane.setName("ContentsPane"); MessagePane.setLayout(null); getContentsPane().add(getOkBut()); getContentsPane().add(getMsgLabel()); } catch (java.lang.Throwable ivjExc) { } } return MessagePane; } private java.awt.Dialog getDialog() { if (AppletDlg == null) { try { AppletDlg = new java.awt.Dialog(new java.awt.Frame());AppletDlg.setName("Dialog1"); AppletDlg.setLayout(new java.awt.BorderLayout()); AppletDlg.setBounds(200, 200,275, 125); AppletDlg.setResizable(false); AppletDlg.setModal(true); getDialog().setTitle("Applet Message"); getDialog().add(getContentsPane(), "Center"); getDialog().addWindowListener(new DialogHandler(AppletDlg)); } catch (java.lang.Throwable Ex) { } } return AppletDlg; } class DialogHandler extends WindowAdapter { Dialog d; DialogHandler(java.awt.Dialog d){ this.d = d; } public void windowClosing(WindowEvent e){ getDialog().dispose(); } } } in this i am adding one Button and a Label to the Dialog. and i am showing the dialog Like this " getDialog().show()" but in IE it is giving some warning like Warning : AppletWindow, and in Netscape it is giving some warning like "SignedBy: Unsigned classes from local hard disk" How to remove these Warnings? Sir if you respond Immediately it will be very helpful to me