Hi paul,

I am passing the applet parent to the dialog by calling the following
function.

public JConnectionDialog extends JDialog
{
        public JConnectionDialog(javax.swing.JApplet parent)
        {
                super(JOptionPane.getFrameForComponent(parent));

I am setting my dialog's parent applet by using the above snippet.

But i tried with u r snippet. it doesn't work. Any idea

wbr,
Srinivasan              

-----Original Message-----
From: Farwell, Paul [mailto:[EMAIL PROTECTED]]
Sent: 05 December 2001 21:23
To: 'Samivelu, Srinivasan'; '[EMAIL PROTECTED]'
Subject: RE: Setting Icon for JDialog if JApplet is the parent


Does this work?

      Frame f = JOptionPane.getFrameForComponent(this);
      ImageIcon icon = new ImageIcon(/* load image */);
      f.setIconImage(icon.getImage());

-----Original Message-----
From: Samivelu, Srinivasan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 1:47 AM
To: '[EMAIL PROTECTED]'
Subject: Setting Icon for JDialog if JApplet is the parent


Dear All

        In my applet program, I am using Jdialog to diplay info. I have set
the JApplet as the parent to the JDialog. But i want to set my icon for the
dialog. i am 
        using jdk1.3.1. I see in the case of JFrame, Setting icon for the
parent is carried over to the child dialogs. But in the case of the JApplet,
how to set the icon. 
        Any workaround for this would be much appreciated.

Thanks in advance
wbr,
Srinivasan Samivelu

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to