< prev index next >

src/java.desktop/share/classes/sun/applet/AppletPanel.java

Print this page




 754 
 755         // Fixed #4508194: NullPointerException thrown during
 756         // quick page switch
 757         //
 758         if (applet != null)
 759         {
 760             // Stick it in the frame
 761             applet.setStub(this);
 762             applet.hide();
 763             add("Center", applet);
 764             showAppletStatus("loaded");
 765             validate();
 766         }
 767     }
 768 
 769     protected Applet createApplet(final AppletClassLoader loader) throws ClassNotFoundException,
 770                                                                          IllegalAccessException, IOException, InstantiationException, InterruptedException {
 771         String code = getCode();
 772 
 773         if (code != null) {
 774             applet = (Applet)loader.loadCode(code).newInstance();


 775         } else {
 776             String msg = "nocode";
 777             status = APPLET_ERROR;
 778             showAppletStatus(msg);
 779             showAppletLog(msg);
 780             repaint();
 781         }
 782 
 783         // Determine the JDK level that the applet targets.
 784         // This is critical for enabling certain backward
 785         // compatibility switch if an applet is a JDK 1.1
 786         // applet. [stanley.ho]
 787         findAppletJDKLevel(applet);
 788 
 789         if (Thread.interrupted()) {
 790             try {
 791                 status = APPLET_DISPOSE; // APPLET_ERROR?
 792                 applet = null;
 793                 // REMIND: This may not be exactly the right thing: the
 794                 // status is set by the stop button and not necessarily




 754 
 755         // Fixed #4508194: NullPointerException thrown during
 756         // quick page switch
 757         //
 758         if (applet != null)
 759         {
 760             // Stick it in the frame
 761             applet.setStub(this);
 762             applet.hide();
 763             add("Center", applet);
 764             showAppletStatus("loaded");
 765             validate();
 766         }
 767     }
 768 
 769     protected Applet createApplet(final AppletClassLoader loader) throws ClassNotFoundException,
 770                                                                          IllegalAccessException, IOException, InstantiationException, InterruptedException {
 771         String code = getCode();
 772 
 773         if (code != null) {
 774             @SuppressWarnings("deprecation")
 775             Object tmp = loader.loadCode(code).newInstance();
 776             applet = (Applet)tmp;
 777         } else {
 778             String msg = "nocode";
 779             status = APPLET_ERROR;
 780             showAppletStatus(msg);
 781             showAppletLog(msg);
 782             repaint();
 783         }
 784 
 785         // Determine the JDK level that the applet targets.
 786         // This is critical for enabling certain backward
 787         // compatibility switch if an applet is a JDK 1.1
 788         // applet. [stanley.ho]
 789         findAppletJDKLevel(applet);
 790 
 791         if (Thread.interrupted()) {
 792             try {
 793                 status = APPLET_DISPOSE; // APPLET_ERROR?
 794                 applet = null;
 795                 // REMIND: This may not be exactly the right thing: the
 796                 // status is set by the stop button and not necessarily


< prev index next >