/Users/lyon/j4p/src/utils/AppletUtil.java

1    package utils; 
2     
3    import java.applet.Applet; 
4    import java.awt.*; 
5     
6    public abstract class AppletUtil { 
7      static Frame appletFrame = new Frame(); 
8     
9      public static void run(Applet applet) { 
10    
11       appletFrame.addNotify(); 
12       appletFrame.add("Center", applet); 
13    
14    
15       appletFrame.setSize(400, 400); 
16    
17       applet.init(); 
18       appletFrame.show(); 
19       applet.start(); 
20    
21     } 
22    
23    
24   }