Hi Gary,
if you do have a frame simply use Dialog d = new Dialog(myFrame); - or
something similar. The dialog will use the frame's icon.
And in case you do not have a frame already open or want a separate icon: use a
dummy frame that contains nothing, needn't to be visible but has set the wanted
icon.
Regards,
Stefan.
"Singh,Gary - PLANO" wrote:
> Hi Stefan,
>
> Thanks. But if I want a JDialog to display a custom gif image how will I do
> it.
>
> Gary Grewal
>
> -----Original Message-----
> From: Stefan Dingfelder
> To: Singh,Gary - PLANO
> Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> Sent: 3/8/01 11:09 AM
> Subject: Re: Having a Custom Gif Image
>
> Hi Gary,
>
> simply set it:
>
> //custom icon:
> ImageIcon icon = .. // put your image icon in here
> if (icon != null) myFrame.setIconImage(icon.getImage());
>
> And just a hint: you cannot do this with dialogs. Instead a dialog will
> use its
> owner's icon.
>
> Regards,
> Stefan
>
> "Singh,Gary - PLANO" wrote:
>
> > Hi :
> >
> > What is the best way to replace the custom Java Cup image on top of a
> JFrame
> > with your own .gif image.
> >
> > Thanks and Regards,
> > Gary Grewal
> >
> > _______________________________________________
> > Swing mailing list
> > [EMAIL PROTECTED]
> > http://eos.dk/mailman/listinfo/swing
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing