Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JApplet initialization

  Asked By: Clifton    Date: Dec 15    Category: Java    Views: 560
  

Does anyone know of a way to add code that will execute immediately after an
applet has finished loading? Right now I am displaying a modal dialog from
a JApplet constructor. That kinda does what I want but my dialog pops up
while the main applet page is still loading. As long as my dialog is
visible I just see this ugly grey box that says the applet is still loading
(and yes, the dialog has to be modal). I would prefer to wait until the
rootPane has completely loaded and is visible before showing the dialog, but
I can't figure out how. I have tried putting my code in start()... No go...
I also tried a hack where I grabbed the Frame for the applet with
JOptionPane.getComponentFrame() and add a WindowListener to it, but again...
Didn't work... Everything I have tried so far has failed and I am out of
ideas. Any suggestions?

Share: 



Tagged: