/[classpath]/classpath/java/awt/Frame.java
ViewVC logotype

Diff of /classpath/java/awt/Frame.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22.2.7 by gnu_andrew, Tue Aug 2 20:12:15 2005 UTC revision 1.22.2.8 by gnu_andrew, Sat Sep 10 15:31:44 2005 UTC
# Line 401  remove(MenuComponent menu) Line 401  remove(MenuComponent menu)
401    menuBar.remove(menu);    menuBar.remove(menu);
402  }  }
403    
 /**  
   * Notifies this frame that it should create its native peer.  
   */  
 private static void fireDummyEvent()  
 {  
   EventQueue.invokeLater(new Runnable()  
     {  
       public void run()  
       {  
         // Do nothing here.  
       }  
     });  
 }  
   
404  public void  public void
405  addNotify()  addNotify()
406  {  {
# Line 423  addNotify() Line 409  addNotify()
409    if (peer == null)    if (peer == null)
410      peer = getToolkit ().createFrame (this);      peer = getToolkit ().createFrame (this);
411    
   // We now know there's a Frame (us) with a live peer, so we can start the  
   // fundamental queue and dispatch thread, by inserting a dummy event.  
   if (parent != null && parent.isDisplayable())  
     fireDummyEvent();  
     
412    super.addNotify();    super.addNotify();
413  }  }
414    
# Line 436  public void removeNotify() Line 417  public void removeNotify()
417    if (menuBar != null)    if (menuBar != null)
418      menuBar.removeNotify();      menuBar.removeNotify();
419    super.removeNotify();    super.removeNotify();
   
   // By now we've been disconnected from the peer, and the peer set to  
   // null.  This is formally the same as saying "we just became  
   // un-displayable", so we wake up the event queue with a dummy event to  
   // see if it's time to shut down.  
   fireDummyEvent();  
420  }  }
421    
422    /**    /**

Legend:
Removed from v.1.22.2.7  
changed lines
  Added in v.1.22.2.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26