// If there were a GeneralApplet interface, or common GeneralApplet superclass. GeneralApplet a; if ( oldStyle ) { a = new extendedApplet(); } else { a = new extendedJApplet(); } a.init();