dcsimg
Making a dialog box position itself like a JOptionPane within an embedded applet
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Liam_Hudson
Posted On:   Thursday, May 23, 2002 05:32 AM

I have an applet which is embedded in a web page. If I fireoff a JOptionPane it is always centered within the applet, even if I move the browser frame around the screen. I cannot replicate this behaviour for my own dialog boxes. Under IE 5.5 the base (or root) frame never contains any X and Y coordinates (they are alway 0,0) so I cannot center my dialog (I do use the recursive getFrame technique to get the 'true' base frame. I have also tried ripping the code out of the JOptionPane class but that does not seem to work either. Has anyone solved this issue? I know how to center dialog in applications, I just am having problems when an applet is embedded within the web page..... Many Thanks    More>>

I have an applet which is embedded in a web page. If I fireoff a JOptionPane it is always centered within the applet, even if I move the browser frame around the screen. I cannot replicate this behaviour for my own dialog boxes.

Under IE 5.5 the base (or root) frame never contains any X and Y coordinates (they are alway 0,0) so I cannot center my dialog (I do use the recursive getFrame technique to get the 'true' base frame. I have also tried ripping the code out of the JOptionPane class but that does not seem to work either.

Has anyone solved this issue? I know how to center dialog in applications, I just am having problems when an applet is embedded within the web page.....

Many Thanks

   <<Less
About | Sitemap | Contact