diff --git a/src/demo/share/jfc/J2Ddemo/java2d/RunWindow.java b/src/demo/share/jfc/J2Ddemo/java2d/RunWindow.java index 7ac88261277..21cef121b61 100644 --- a/src/demo/share/jfc/J2Ddemo/java2d/RunWindow.java +++ b/src/demo/share/jfc/J2Ddemo/java2d/RunWindow.java @@ -362,7 +362,7 @@ public class RunWindow extends JPanel implements Runnable, ActionListener { /** * This class contains initial values for instance variables of 'RunWindow' class, * and its instance is used in creation of 'RunWindow' object. Values parsed from - * certain command line options of the demo or from the demo applet parameters are + * certain command line options of the demo * set to the fields of this class instance. It is a part of the fix which changed * static variables for instance variables in certain demo classes. * diff --git a/src/demo/share/jfc/J2Ddemo/java2d/Tools.java b/src/demo/share/jfc/J2Ddemo/java2d/Tools.java index 3c01042adf4..9535b8c741e 100644 --- a/src/demo/share/jfc/J2Ddemo/java2d/Tools.java +++ b/src/demo/share/jfc/J2Ddemo/java2d/Tools.java @@ -406,13 +406,6 @@ public final class Tools extends JPanel implements ActionListener, if (pDialogState) { printJob.print(aset); } - } catch (@SuppressWarnings("removal") java.security.AccessControlException ace) { - String errmsg = "Applet access control exception; to allow " - + "access to printer, set\n" - + "permission for \"queuePrintJob\" in " - + "RuntimePermission."; - JOptionPane.showMessageDialog(this, errmsg, "Printer Access Error", - JOptionPane.ERROR_MESSAGE); } catch (Exception ex) { Logger.getLogger(Tools.class.getName()).log(Level.SEVERE, null, ex); diff --git a/src/demo/share/jfc/SwingSet2/SwingSet2.java b/src/demo/share/jfc/SwingSet2/SwingSet2.java index 75eeb4e3657..fa78d5b6edc 100644 --- a/src/demo/share/jfc/SwingSet2/SwingSet2.java +++ b/src/demo/share/jfc/SwingSet2/SwingSet2.java @@ -131,7 +131,7 @@ public class SwingSet2 extends JPanel { private JEditorPane demoSrcPane = null; - // contentPane cache, saved from the applet or application frame + // contentPane cache, saved from the application frame Container contentPane = null; @@ -177,7 +177,7 @@ public class SwingSet2 extends JPanel { /** - * SwingSet2 Main. Called only if we're an application, not an applet. + * SwingSet2 Main. */ public static void main(final String[] args) { // must run in EDT when constructing the GUI components @@ -716,8 +716,7 @@ public class SwingSet2 extends JPanel { } /** - * Returns the content pane whether we're in an applet - * or application + * Returns the content pane */ public Container getContentPane() { if(contentPane == null) { diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java index bdf9809ea68..ac2d01aa8dc 100644 --- a/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java +++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java @@ -431,7 +431,6 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo } @Override - @SuppressWarnings("removal") public void mouseReleased(final MouseEvent e) { if (didForwardEvent(e)) return; @@ -467,9 +466,6 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo ((JFrame)frame.getTopLevelAncestor()).getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); ((JFrame)frame.getTopLevelAncestor()).getGlassPane().setVisible(false); - } else if (c instanceof JApplet) { - ((JApplet)c).getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - ((JApplet)c).getGlassPane().setVisible(false); } else if (c instanceof JWindow) { ((JWindow)c).getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); ((JWindow)c).getGlassPane().setVisible(false); diff --git a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java index 054e74dcef2..73e13908fbf 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java @@ -825,7 +825,7 @@ public class LWWindowPeer topmostPlatformWindow != null ? topmostPlatformWindow.getPeer() : null; // topmostWindowPeer == null condition is added for the backward - // compatibility with applets. It can be removed when the + // compatibility. It can be removed when the // getTopmostPlatformWindowUnderMouse() method will be properly // implemented in CPlatformEmbeddedFrame class if (topmostWindowPeer == this || topmostWindowPeer == null) { diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java index 615fcec9a77..c91491ac53f 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java @@ -433,7 +433,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo // If the target is a dialog, popup or tooltip we want it to ignore the brushed metal look. if (isPopup) { styleBits = SET(styleBits, TEXTURED, false); - // Popups in applets don't activate applet's process styleBits = SET(styleBits, NONACTIVATING, true); styleBits = SET(styleBits, IS_POPUP, true); } @@ -714,7 +713,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo boolean isPopup = (target.getType() == Window.Type.POPUP); execute(ptr -> { if (isPopup) { - // Popups in applets don't activate applet's process CWrapper.NSWindow.orderFrontRegardless(ptr); } else { CWrapper.NSWindow.orderFront(ptr); diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m index d26def5694f..e81335c0d9e 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m @@ -49,7 +49,7 @@ * when we get a punctuation char what was the real hardware key was that * was pressed? Although '&' often comes from Shift-7 the keyboard can be * remapped! I don't think there really is a good answer, and hopefully - * all good applets are only interested in logical key typed events not + * all good applications are only interested in logical key typed events not * press/release. Meanwhile, we are hard-coding the shifted punctuation * to trigger the virtual keys that are the expected ones under a standard * keymapping. Looking at Windows & Mac, they don't actually do this, the diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/DnDUtilities.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/DnDUtilities.m index 6c7f3aee8fa..7eb7b104bcd 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/DnDUtilities.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/DnDUtilities.m @@ -43,7 +43,6 @@ There are several problems with Drag and Drop - notably, the mismatch between Ja @implementation DnDUtilities // Make sure we don't let other apps see local drags by using a process unique pasteboard type. -// This may not work in the Applet case, since they are all running in the same VM + (NSString *) javaPboardType { static NSString *customJavaPboardType = nil; if (customJavaPboardType == nil) diff --git a/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java b/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java index 8040120695d..277b00ba4cf 100644 --- a/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java +++ b/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java @@ -25,7 +25,6 @@ package com.sun.java.swing; -import java.applet.Applet; import java.awt.Component; import java.awt.Container; import java.awt.Graphics; @@ -53,9 +52,7 @@ import static sun.java2d.pipe.Region.clipRound; * releases and even patch releases. You should not rely on this class even * existing. * - * This is a second part of sun.swing.SwingUtilities2. It is required - * to provide services for JavaFX applets. - * + * This is a second part of sun.swing.SwingUtilities2. */ public class SwingUtilities3 { /** @@ -91,14 +88,12 @@ public class SwingUtilities3 { * depends on current RepaintManager's RepaintManager.PaintManager * and on the capabilities of the graphics hardware/software and what not. * - * @param rootContainer topmost container. Should be either {@code Window} - * or {@code Applet} + * @param rootContainer topmost container. Should be {@code Window} * @param isRequested the value to set vsyncRequested state to */ - @SuppressWarnings("removal") public static void setVsyncRequested(Container rootContainer, boolean isRequested) { - assert (rootContainer instanceof Applet) || (rootContainer instanceof Window); + assert (rootContainer instanceof Window); if (isRequested) { vsyncedMap.put(rootContainer, Boolean.TRUE); } else { @@ -109,12 +104,11 @@ public class SwingUtilities3 { /** * Checks if vsync painting is requested for {@code rootContainer} * - * @param rootContainer topmost container. Should be either Window or Applet + * @param rootContainer topmost container. Should be Window * @return {@code true} if vsync painting is requested for {@code rootContainer} */ - @SuppressWarnings("removal") public static boolean isVsyncRequested(Container rootContainer) { - assert (rootContainer instanceof Applet) || (rootContainer instanceof Window); + assert (rootContainer instanceof Window); return Boolean.TRUE == vsyncedMap.get(rootContainer); } diff --git a/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java b/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java index fa90f92f0ab..6b81eaf008e 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java @@ -25,16 +25,17 @@ package com.sun.media.sound; -import java.applet.AudioClip; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; +import javax.sound.SoundClip; import javax.sound.midi.InvalidMidiDataException; import javax.sound.midi.MetaEventListener; import javax.sound.midi.MetaMessage; @@ -59,8 +60,7 @@ import javax.sound.sampled.UnsupportedAudioFileException; * @author Arthur van Hoff, Kara Kytle, Jan Borgersen * @author Florian Bomers */ -@SuppressWarnings("removal") -public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, LineListener { +public final class JavaSoundAudioClip implements MetaEventListener, LineListener { private long lastPlayCall = 0; private static final int MINIMUM_PLAY_DELAY = 30; @@ -103,24 +103,28 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L return clip; } - public static JavaSoundAudioClip create(final URLConnection uc) { - JavaSoundAudioClip clip = new JavaSoundAudioClip(); + /* Used [only] by sun.awt.www.content.MultiMediaContentHandlers */ + public static SoundClip create(final URLConnection uc) { + File tmpFile = null; try { - clip.init(uc.getInputStream()); - } catch (final Exception ignored) { - // Playing the clip will be a no-op if an exception occured in inititialization. + tmpFile = File.createTempFile("javaurl", ".aud"); + } catch (IOException e) { + return null; } - return clip; - } - public static JavaSoundAudioClip create(final URL url) { - JavaSoundAudioClip clip = new JavaSoundAudioClip(); - try { - clip.init(url.openStream()); - } catch (final Exception ignored) { - // Playing the clip will be a no-op if an exception occurred in inititialization. + try (InputStream in = uc.getInputStream(); + FileOutputStream out = new FileOutputStream(tmpFile)) { + in.transferTo(out); + } catch (IOException e) { } - return clip; + + try { + return SoundClip.createSoundClip(tmpFile); + } catch (IOException e) { + } finally { + tmpFile.delete(); + } + return null; } private void init(InputStream in) throws IOException { @@ -167,7 +171,6 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L return false; } - @Override public synchronized void play() { if (!success) { return; @@ -175,7 +178,6 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L startImpl(false); } - @Override public synchronized void loop() { if (!success) { return; @@ -184,7 +186,7 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L } private synchronized void startImpl(boolean loop) { - // hack for some applets that call the start method very rapidly... + // hack for some applications that call the start method very rapidly... long currentTime = System.currentTimeMillis(); long diff = currentTime - lastPlayCall; if (diff < MINIMUM_PLAY_DELAY) { @@ -247,7 +249,6 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L } } - @Override public synchronized void stop() { if (!success) { return; diff --git a/src/java.desktop/share/classes/java/applet/Applet.java b/src/java.desktop/share/classes/java/applet/Applet.java deleted file mode 100644 index 56b2392f0e2..00000000000 --- a/src/java.desktop/share/classes/java/applet/Applet.java +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright (c) 1995, 2025, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package java.applet; - -import java.awt.Dimension; -import java.awt.GraphicsEnvironment; -import java.awt.HeadlessException; -import java.awt.Image; -import java.awt.Panel; -import java.awt.event.ComponentEvent; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.Serial; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Locale; - -import javax.accessibility.AccessibleContext; -import javax.accessibility.AccessibleRole; -import javax.accessibility.AccessibleState; -import javax.accessibility.AccessibleStateSet; - -import com.sun.media.sound.JavaSoundAudioClip; - -/** - * An applet is a small program that is intended not to be run on its own, but - * rather to be embedded inside another application. - *

- * The {@code Applet} class must be the superclass of any applet that is to be - * embedded in a Web page or viewed by the Java Applet Viewer. The - * {@code Applet} class provides a standard interface between applets and their - * environment. - * - * @author Arthur van Hoff - * @author Chris Warth - * @since 1.0 - * @deprecated The Applet API is deprecated, no replacement. - */ -@Deprecated(since = "9", forRemoval = true) -@SuppressWarnings("removal") -public class Applet extends Panel { - - /** - * Constructs a new Applet. - *

- * Note: Many methods in {@code java.applet.Applet} may be invoked by the - * applet only after the applet is fully constructed; applet should avoid - * calling methods in {@code java.applet.Applet} in the constructor. - * - * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} - * returns {@code true} - * @see java.awt.GraphicsEnvironment#isHeadless - * @since 1.4 - */ - public Applet() throws HeadlessException { - if (GraphicsEnvironment.isHeadless()) { - throw new HeadlessException(); - } - } - - /** - * Applets can be serialized but the following conventions MUST be followed: - *

- * Before Serialization: An applet must be in STOPPED state. - *

- * After Deserialization: The applet will be restored in STOPPED state (and - * most clients will likely move it into RUNNING state). The stub field will - * be restored by the reader. - */ - private transient AppletStub stub; - - /** - * Use serialVersionUID from JDK 1.0 for interoperability. - */ - @Serial - private static final long serialVersionUID = -5836846270535785031L; - - /** - * Read an applet from an object input stream. - * - * @param s the {@code ObjectInputStream} to read - * @throws ClassNotFoundException if the class of a serialized object could - * not be found - * @throws IOException if an I/O error occurs - * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} - * returns {@code true} - * - * @see java.awt.GraphicsEnvironment#isHeadless - * @since 1.4 - */ - @Serial - private void readObject(ObjectInputStream s) - throws ClassNotFoundException, IOException, HeadlessException { - if (GraphicsEnvironment.isHeadless()) { - throw new HeadlessException(); - } - s.defaultReadObject(); - } - - /** - * Sets this applet's stub. This is done automatically by the system. - * - * @param stub the new stub - */ - public final void setStub(AppletStub stub) { - this.stub = stub; - } - - /** - * Determines if this applet is active. An applet is marked active just - * before its {@code start} method is called. It becomes inactive just - * before its {@code stop} method is called. - * - * @return {@code true} if the applet is active; {@code false} otherwise - * @see java.applet.Applet#start() - * @see java.applet.Applet#stop() - */ - public boolean isActive() { - if (stub != null) { - return stub.isActive(); - } else { // If stub field not filled in, applet never active - return false; - } - } - - /** - * Gets the {@code URL} of the document in which this applet is embedded. - * For example, suppose an applet is contained within the document: - *

-     *    http://www.oracle.com/technetwork/java/index.html
-     * 
- * The document base is: - *
-     *    http://www.oracle.com/technetwork/java/index.html
-     * 
- * - * @return the {@link java.net.URL} of the document that contains this - * applet - * @see java.applet.Applet#getCodeBase() - */ - public URL getDocumentBase() { - return stub.getDocumentBase(); - } - - /** - * Gets the base {@code URL}. This is the {@code URL} of the directory which - * contains this applet. - * - * @return the base {@link java.net.URL} of the directory which contains - * this applet - * @see java.applet.Applet#getDocumentBase() - */ - public URL getCodeBase() { - return stub.getCodeBase(); - } - - /** - * Returns the value of the named parameter in the HTML tag. For example, if - * this applet is specified as - *
-     * <applet code="Clock" width=50 height=50>
-     * <param name=Color value="blue">
-     * </applet>
-     * 
- *

- * then a call to {@code getParameter("Color")} returns the value - * {@code "blue"}. - *

- * The {@code name} argument is case insensitive. - * - * @param name a parameter name - * @return the value of the named parameter, or {@code null} if not set - */ - public String getParameter(String name) { - return stub.getParameter(name); - } - - /** - * Determines this applet's context, which allows the applet to query and - * affect the environment in which it runs. - *

- * This environment of an applet represents the document that contains the - * applet. - * - * @return the applet's context - */ - public AppletContext getAppletContext() { - return stub.getAppletContext(); - } - - /** - * Requests that this applet be resized. - * - * @param width the new requested width for the applet - * @param height the new requested height for the applet - */ - @SuppressWarnings("deprecation") - public void resize(int width, int height) { - Dimension d = size(); - if ((d.width != width) || (d.height != height)) { - super.resize(width, height); - if (stub != null) { - stub.appletResize(width, height); - } - } - } - - /** - * Requests that this applet be resized. - * - * @param d an object giving the new width and height - */ - @SuppressWarnings("deprecation") - public void resize(Dimension d) { - resize(d.width, d.height); - } - - /** - * Indicates if this container is a validate root. - *

- * {@code Applet} objects are the validate roots, and, therefore, they - * override this method to return {@code true}. - * - * @return {@code true} - * @see java.awt.Container#isValidateRoot - * @since 1.7 - */ - @Override - public boolean isValidateRoot() { - return true; - } - - /** - * Requests that the argument string be displayed in the "status window". - * Many browsers and applet viewers provide such a window, where the - * application can inform users of its current state. - * - * @param msg a string to display in the status window - */ - public void showStatus(String msg) { - getAppletContext().showStatus(msg); - } - - /** - * Returns an {@code Image} object that can then be painted on the screen. - * The {@code url} that is passed as an argument must specify an absolute - * {@code URL}. - *

- * This method always returns immediately, whether or not the image exists. - * When this applet attempts to draw the image on the screen, the data will - * be loaded. The graphics primitives that draw the image will incrementally - * paint on the screen. - * - * @param url an absolute {@code URL} giving the location of the image - * @return the image at the specified {@code URL} - * @see java.awt.Image - */ - public Image getImage(URL url) { - return getAppletContext().getImage(url); - } - - /** - * Returns an {@code Image} object that can then be painted on the screen. - * The {@code url} argument must specify an absolute {@code URL}. The - * {@code name} argument is a specifier that is relative to the {@code url} - * argument. - *

- * This method always returns immediately, whether or not the image exists. - * When this applet attempts to draw the image on the screen, the data will - * be loaded. The graphics primitives that draw the image will incrementally - * paint on the screen. - * - * @param url an absolute URL giving the base location of the image - * @param name the location of the image, relative to the {@code url} - * argument - * @return the image at the specified {@code URL} - * @see java.awt.Image - */ - public Image getImage(URL url, String name) { - try { - @SuppressWarnings("deprecation") - var u = new URL(url, name); - return getImage(u); - } catch (MalformedURLException e) { - return null; - } - } - - /** - * Get an audio clip from the given {@code URL}. - * - * @param url points to the audio clip - * @return the audio clip at the specified {@code URL} - * @since 1.2 - */ - public static final AudioClip newAudioClip(URL url) { - return JavaSoundAudioClip.create(url); - } - - /** - * Returns the {@code AudioClip} object specified by the {@code URL} - * argument. - *

- * This method always returns immediately, whether or not the audio clip - * exists. When this applet attempts to play the audio clip, the data will - * be loaded. - * - * @param url an absolute {@code URL} giving the location of the audio clip - * @return the audio clip at the specified {@code URL} - * @see java.applet.AudioClip - */ - public AudioClip getAudioClip(URL url) { - return getAppletContext().getAudioClip(url); - } - - /** - * Returns the {@code AudioClip} object specified by the {@code URL} and - * {@code name} arguments. - *

- * This method always returns immediately, whether or not the audio clip - * exists. When this applet attempts to play the audio clip, the data will - * be loaded. - * - * @param url an absolute {@code URL} giving the base location of the audio - * clip - * @param name the location of the audio clip, relative to the {@code url} - * argument - * @return the audio clip at the specified {@code URL} - * @see java.applet.AudioClip - */ - public AudioClip getAudioClip(URL url, String name) { - try { - @SuppressWarnings("deprecation") - var u = new URL(url, name); - return getAudioClip(u); - } catch (MalformedURLException e) { - return null; - } - } - - /** - * Returns information about this applet. An applet should override this - * method to return a {@code String} containing information about the - * author, version, and copyright of the applet. - *

- * The implementation of this method provided by the {@code Applet} class - * returns {@code null}. - * - * @return a string containing information about the author, version, and - * copyright of the applet - */ - public String getAppletInfo() { - return null; - } - - /** - * Gets the locale of the applet. It allows the applet to maintain its own - * locale separated from the locale of the browser or appletviewer. - * - * @return the locale of the applet; if no locale has been set, the default - * locale is returned - * @since 1.1 - */ - public Locale getLocale() { - Locale locale = super.getLocale(); - if (locale == null) { - return Locale.getDefault(); - } - return locale; - } - - /** - * Returns information about the parameters that are understood by this - * applet. An applet should override this method to return an array of - * strings describing these parameters. - *

- * Each element of the array should be a set of three strings containing the - * name, the type, and a description. For example: - *

-     * String pinfo[][] = {
-     *   {"fps",    "1-10",    "frames per second"},
-     *   {"repeat", "boolean", "repeat image loop"},
-     *   {"imgs",   "url",     "images directory"}
-     * };
-     * 
- *

- * The implementation of this method provided by the {@code Applet} class - * returns {@code null}. - * - * @return an array describing the parameters this applet looks for - */ - public String[][] getParameterInfo() { - return null; - } - - /** - * Plays the audio clip at the specified absolute {@code URL}. Nothing - * happens if the audio clip cannot be found. - * - * @param url an absolute {@code URL} giving the location of the audio clip - */ - public void play(URL url) { - AudioClip clip = getAudioClip(url); - if (clip != null) { - clip.play(); - } - } - - /** - * Plays the audio clip given the {@code URL} and a specifier that is - * relative to it. Nothing happens if the audio clip cannot be found. - * - * @param url an absolute {@code URL} giving the base location of the audio - * clip - * @param name the location of the audio clip, relative to the {@code url} - * argument - */ - public void play(URL url, String name) { - AudioClip clip = getAudioClip(url, name); - if (clip != null) { - clip.play(); - } - } - - /** - * Called by the browser or applet viewer to inform this applet that it has - * been loaded into the system. It is always called before the first time - * that the {@code start} method is called. - *

- * A subclass of {@code Applet} should override this method if it has - * initialization to perform. For example, an applet with threads would use - * the {@code init} method to create the threads and the {@code destroy} - * method to kill them. - *

- * The implementation of this method provided by the {@code Applet} class - * does nothing. - * - * @see java.applet.Applet#destroy() - * @see java.applet.Applet#start() - * @see java.applet.Applet#stop() - */ - public void init() { - } - - /** - * Called by the browser or applet viewer to inform this applet that it - * should start its execution. It is called after the {@code init} method - * and each time the applet is revisited in a Web page. - *

- * A subclass of {@code Applet} should override this method if it has any - * operation that it wants to perform each time the Web page containing it - * is visited. For example, an applet with animation might want to use the - * {@code start} method to resume animation, and the {@code stop} method to - * suspend the animation. - *

- * Note: some methods, such as {@code getLocationOnScreen}, can only provide - * meaningful results if the applet is showing. Because {@code isShowing} - * returns {@code false} when the applet's {@code start} is first called, - * methods requiring {@code isShowing} to return {@code true} should be - * called from a {@code ComponentListener}. - *

- * The implementation of this method provided by the {@code Applet} class - * does nothing. - * - * @see java.applet.Applet#destroy() - * @see java.applet.Applet#init() - * @see java.applet.Applet#stop() - * @see java.awt.Component#isShowing() - * @see java.awt.event.ComponentListener#componentShown(ComponentEvent) - */ - public void start() { - } - - /** - * Called by the browser or applet viewer to inform this applet that it - * should stop its execution. It is called when the Web page that contains - * this applet has been replaced by another page, and also just before the - * applet is to be destroyed. - *

- * A subclass of {@code Applet} should override this method if it has any - * operation that it wants to perform each time the Web page containing it - * is no longer visible. For example, an applet with animation might want to - * use the {@code start} method to resume animation, and the {@code stop} - * method to suspend the animation. - *

- * The implementation of this method provided by the {@code Applet} class - * does nothing. - * - * @see java.applet.Applet#destroy() - * @see java.applet.Applet#init() - */ - public void stop() { - } - - /** - * Called by the browser or applet viewer to inform this applet that it is - * being reclaimed and that it should destroy any resources that it has - * allocated. The {@code stop} method will always be called before - * {@code destroy}. - *

- * A subclass of {@code Applet} should override this method if it has any - * operation that it wants to perform before it is destroyed. For example, - * an applet with threads would use the {@code init} method to create the - * threads and the {@code destroy} method to kill them. - *

- * The implementation of this method provided by the {@code Applet} class - * does nothing. - * - * @see java.applet.Applet#init() - * @see java.applet.Applet#start() - * @see java.applet.Applet#stop() - */ - public void destroy() { - } - - // - // Accessibility support - // - - /** - * @serial The accessible context associated with this {@code Applet}. - */ - @SuppressWarnings("serial") // Not statically typed as Serializable - AccessibleContext accessibleContext = null; - - /** - * Gets the {@code AccessibleContext} associated with this {@code Applet}. - * For applets, the {@code AccessibleContext} takes the form of an - * {@code AccessibleApplet}. A new {@code AccessibleApplet} instance is - * created if necessary. - * - * @return an {@code AccessibleApplet} that serves as the - * {@code AccessibleContext} of this {@code Applet} - * @since 1.3 - */ - public AccessibleContext getAccessibleContext() { - if (accessibleContext == null) { - accessibleContext = new AccessibleApplet(); - } - return accessibleContext; - } - - /** - * This class implements accessibility support for the {@code Applet} class. - * It provides an implementation of the Java Accessibility API appropriate - * to applet user-interface elements. - * - * @since 1.3 - */ - protected class AccessibleApplet extends AccessibleAWTPanel { - - /** - * Use serialVersionUID from JDK 1.3 for interoperability. - */ - @Serial - private static final long serialVersionUID = 8127374778187708896L; - - /** - * Constructs an {@code AccessibleApplet}. - */ - protected AccessibleApplet() {} - - /** - * Get the role of this object. - * - * @return an instance of {@code AccessibleRole} describing the role of - * the object - */ - public AccessibleRole getAccessibleRole() { - return AccessibleRole.FRAME; - } - - /** - * Get the state of this object. - * - * @return an instance of {@code AccessibleStateSet} containing the - * current state set of the object - * @see AccessibleState - */ - public AccessibleStateSet getAccessibleStateSet() { - AccessibleStateSet states = super.getAccessibleStateSet(); - states.add(AccessibleState.ACTIVE); - return states; - } - } -} diff --git a/src/java.desktop/share/classes/java/applet/AppletContext.java b/src/java.desktop/share/classes/java/applet/AppletContext.java deleted file mode 100644 index 792bfa05bfd..00000000000 --- a/src/java.desktop/share/classes/java/applet/AppletContext.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package java.applet; - -import java.awt.Image; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Enumeration; -import java.util.Iterator; - -/** - * This interface corresponds to an applet's environment: the document - * containing the applet and the other applets in the same document. - *

- * The methods in this interface can be used by an applet to obtain information - * about its environment. - * - * @author Arthur van Hoff - * @since 1.0 - * @deprecated The Applet API is deprecated, no replacement. - */ -@Deprecated(since = "9", forRemoval = true) -@SuppressWarnings("removal") -public interface AppletContext { - - /** - * Creates an audio clip. - * - * @param url an absolute {@code URL} giving the location of the audio clip - * @return the audio clip at the specified {@code URL} - */ - AudioClip getAudioClip(URL url); - - /** - * Returns an {@code Image} object that can then be painted on the screen. - * The {@code url} argument that is passed as an argument must specify an - * absolute {@code URL}. - *

- * This method always returns immediately, whether or not the image exists. - * When the applet attempts to draw the image on the screen, the data will - * be loaded. The graphics primitives that draw the image will incrementally - * paint on the screen. - * - * @param url an absolute {@code URL} giving the location of the image - * @return the image at the specified {@code URL} - * @see java.awt.Image - */ - Image getImage(URL url); - - /** - * Finds and returns the applet in the document represented by this applet - * context with the given name. The name can be set in the HTML tag by - * setting the {@code name} attribute. - * - * @param name an applet name - * @return the applet with the given name, or {@code null} if not found - */ - Applet getApplet(String name); - - /** - * Finds all the applets in the document represented by this applet context. - * - * @return an enumeration of all applets in the document represented by this - * applet context - */ - Enumeration getApplets(); - - /** - * Requests that the browser or applet viewer show the Web page indicated by - * the {@code url} argument. The browser or applet viewer determines which - * window or frame to display the Web page. This method may be ignored by - * applet contexts that are not browsers. - * - * @param url an absolute {@code URL} giving the location of the document - */ - void showDocument(URL url); - - /** - * Requests that the browser or applet viewer show the Web page indicated by - * the {@code url} argument. The {@code target} argument indicates in which - * HTML frame the document is to be displayed. The target argument is - * interpreted as follows: - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Target arguments and their descriptions
Target Argument - * Description - *
{@code "_self"} - * Show in the window and frame that contain the applet. - *
{@code "_parent"} - * Show in the applet's parent frame. If the applet's frame has no - * parent frame, acts the same as "_self". - *
{@code "_top"} - * Show in the top-level frame of the applet's window. If the - * applet's frame is the top-level frame, acts the same as "_self". - *
{@code "_blank"} - * Show in a new, unnamed top-level window. - *
name - * Show in the frame or window named name. If a target named - * name does not already exist, a new top-level window with the - * specified name is created, and the document is shown there. - *
- *

- * An applet viewer or browser is free to ignore {@code showDocument}. - * - * @param url an absolute {@code URL} giving the location of the document - * @param target a {@code String} indicating where to display the page - */ - public void showDocument(URL url, String target); - - /** - * Requests that the argument string be displayed in the "status window". - * Many browsers and applet viewers provide such a window, where the - * application can inform users of its current state. - * - * @param status a string to display in the status window - */ - void showStatus(String status); - - /** - * Associates the specified stream with the specified key in this applet - * context. If the applet context previously contained a mapping for this - * key, the old value is replaced. - *

- * For security reasons, mapping of streams and keys exists for each - * codebase. In other words, applet from one codebase cannot access the - * streams created by an applet from a different codebase - * - * @param key key with which the specified value is to be associated - * @param stream stream to be associated with the specified key. If this - * parameter is {@code null}, the specified key is removed in this - * applet context. - * @throws IOException if the stream size exceeds a certain size limit. Size - * limit is decided by the implementor of this interface. - * @since 1.4 - */ - public void setStream(String key, InputStream stream) throws IOException; - - /** - * Returns the stream to which specified key is associated within this - * applet context. Returns {@code null} if the applet context contains no - * stream for this key. - *

- * For security reasons, mapping of streams and keys exists for each - * codebase. In other words, applet from one codebase cannot access the - * streams created by an applet from a different codebase. - * - * @param key key whose associated stream is to be returned - * @return the stream to which this applet context maps the key - * @since 1.4 - */ - public InputStream getStream(String key); - - /** - * Finds all the keys of the streams in this applet context. - *

- * For security reasons, mapping of streams and keys exists for each - * codebase. In other words, applet from one codebase cannot access the - * streams created by an applet from a different codebase. - * - * @return an {@code Iterator} of all the names of the streams in this - * applet context - * @since 1.4 - */ - public Iterator getStreamKeys(); -} diff --git a/src/java.desktop/share/classes/java/applet/AppletStub.java b/src/java.desktop/share/classes/java/applet/AppletStub.java deleted file mode 100644 index fea295e727f..00000000000 --- a/src/java.desktop/share/classes/java/applet/AppletStub.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package java.applet; - -import java.net.URL; - -/** - * When an applet is first created, an applet stub is attached to it using the - * applet's {@code setStub} method. This stub serves as the interface between - * the applet and the browser environment or applet viewer environment in which - * the application is running. - * - * @author Arthur van Hoff - * @see java.applet.Applet#setStub(java.applet.AppletStub) - * @since 1.0 - * @deprecated The Applet API is deprecated, no replacement. - */ -@Deprecated(since = "9", forRemoval = true) -@SuppressWarnings("removal") -public interface AppletStub { - - /** - * Determines if the applet is active. An applet is active just before its - * {@code start} method is called. It becomes inactive just before its - * {@code stop} method is called. - * - * @return {@code true} if the applet is active; {@code false} otherwise - */ - boolean isActive(); - - /** - * Gets the {@code URL} of the document in which the applet is embedded. For - * example, suppose an applet is contained within the document: - *

-     *    http://www.oracle.com/technetwork/java/index.html
-     * 
- * The document base is: - *
-     *    http://www.oracle.com/technetwork/java/index.html
-     * 
- * - * @return the {@link java.net.URL} of the document that contains the applet - * @see java.applet.AppletStub#getCodeBase() - */ - URL getDocumentBase(); - - /** - * Gets the base {@code URL}. This is the {@code URL} of the directory which - * contains the applet. - * - * @return the base {@link java.net.URL} of the directory which contains the - * applet - * @see java.applet.AppletStub#getDocumentBase() - */ - URL getCodeBase(); - - /** - * Returns the value of the named parameter in the HTML tag. For example, if - * an applet is specified as - *
-     * <applet code="Clock" width=50 height=50>
-     * <param name=Color value="blue">
-     * </applet>
-     * 
- *

- * then a call to {@code getParameter("Color")} returns the value - * {@code "blue"}. - * - * @param name a parameter name - * @return the value of the named parameter, or {@code null} if not set - */ - String getParameter(String name); - - /** - * Returns the applet's context. - * - * @return the applet's context - */ - AppletContext getAppletContext(); - - /** - * Called when the applet wants to be resized. - * - * @param width the new requested width for the applet - * @param height the new requested height for the applet - */ - void appletResize(int width, int height); -} diff --git a/src/java.desktop/share/classes/java/applet/AudioClip.java b/src/java.desktop/share/classes/java/applet/AudioClip.java deleted file mode 100644 index 50638ec215e..00000000000 --- a/src/java.desktop/share/classes/java/applet/AudioClip.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package java.applet; - -/** - * The {@code AudioClip} interface is a simple abstraction for playing a sound - * clip. Multiple {@code AudioClip} items can be playing at the same time, and - * the resulting sound is mixed together to produce a composite. - * - * @author Arthur van Hoff - * @since 1.0 - * @deprecated The Applet API is deprecated, no replacement. - */ -@Deprecated(since = "9", forRemoval = true) -public interface AudioClip { - - /** - * Starts playing this audio clip. Each time this method is called, the clip - * is restarted from the beginning. - */ - void play(); - - /** - * Starts playing this audio clip in a loop. - */ - void loop(); - - /** - * Stops playing this audio clip. - */ - void stop(); -} diff --git a/src/java.desktop/share/classes/java/applet/package-info.java b/src/java.desktop/share/classes/java/applet/package-info.java deleted file mode 100644 index 492edbcff08..00000000000 --- a/src/java.desktop/share/classes/java/applet/package-info.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/** - * Provides the classes necessary to create an applet and the classes an applet - * uses to communicate with its applet context. - *

- * The applet framework involves two entities: the applet and the - * applet context. An applet is an embeddable window (see the Panel - * class) with a few extra methods that the applet context can use to - * initialize, start, and stop the applet. - *

- * The applet context is an application that is responsible for loading and - * running applets. For example, the applet context could be a Web browser or an - * applet development environment. - *

- * This package has been deprecated and may be removed in - * a future version of the Java Platform. There is no replacement. - * All of the classes and interfaces in this package have been terminally - * deprecated. - * Users are advised to migrate their applications to other technologies. - * - * @since 1.0 - */ -package java.applet; diff --git a/src/java.desktop/share/classes/java/awt/Component.java b/src/java.desktop/share/classes/java/awt/Component.java index 55fb06247af..e78cab2a14c 100644 --- a/src/java.desktop/share/classes/java/awt/Component.java +++ b/src/java.desktop/share/classes/java/awt/Component.java @@ -25,7 +25,6 @@ package java.awt; -import java.applet.Applet; import java.awt.dnd.DropTarget; import java.awt.event.ActionEvent; import java.awt.event.AdjustmentEvent; @@ -237,8 +236,7 @@ public abstract class Component implements ImageObserver, MenuContainer, transient Container parent; /** - * The {@code AppContext} of the component. Applets/Plugin may - * change the AppContext. + * The {@code AppContext} of the component. */ transient AppContext appContext; @@ -3937,10 +3935,9 @@ public abstract class Component implements ImageObserver, MenuContainer, /** * Inner class for flipping buffers on a component. That component must - * be a {@code Canvas} or {@code Window} or {@code Applet}. + * be a {@code Canvas} or {@code Window}. * @see Canvas * @see Window - * @see Applet * @see java.awt.image.BufferStrategy * @author Michael Martak * @since 1.4 @@ -3988,11 +3985,9 @@ public abstract class Component implements ImageObserver, MenuContainer, /** * Creates a new flipping buffer strategy for this component. - * The component must be a {@code Canvas} or {@code Window} or - * {@code Applet}. + * The component must be a {@code Canvas} or {@code Window}. * @see Canvas * @see Window - * @see Applet * @param numBuffers the number of buffers * @param caps the capabilities of the buffers * @throws AWTException if the capabilities supplied could not be @@ -4010,11 +4005,10 @@ public abstract class Component implements ImageObserver, MenuContainer, throws AWTException { if (!(Component.this instanceof Window) && - !(Component.this instanceof Canvas) && - !(Component.this instanceof Applet)) + !(Component.this instanceof Canvas)) { throw new ClassCastException( - "Component must be a Canvas or Window or Applet"); + "Component must be a Canvas or Window"); } this.numBuffers = numBuffers; this.caps = caps; @@ -8161,12 +8155,6 @@ public abstract class Component implements ImageObserver, MenuContainer, focusLog.finer("default component is " + toFocus); } } - if (toFocus == null) { - Applet applet = EmbeddedFrame.getAppletIfAncestorOf(this); - if (applet != null) { - toFocus = applet; - } - } candidate = toFocus; } if (focusLog.isLoggable(PlatformLogger.Level.FINER)) { diff --git a/src/java.desktop/share/classes/java/awt/Container.java b/src/java.desktop/share/classes/java/awt/Container.java index 9bfb41a871e..683c24f9d13 100644 --- a/src/java.desktop/share/classes/java/awt/Container.java +++ b/src/java.desktop/share/classes/java/awt/Container.java @@ -1557,8 +1557,8 @@ public class Container extends Component { * as a {@code Frame} object) should be used to restore the validity of the * component hierarchy. *

- * The {@code Window} class and the {@code Applet} class are the validate - * roots in AWT. Swing introduces more validate roots. + * The {@code Window} class is the validate root in AWT. + * Swing introduces more validate roots. * * @return whether this container is a validate root * @see #invalidate diff --git a/src/java.desktop/share/classes/java/awt/Dialog.java b/src/java.desktop/share/classes/java/awt/Dialog.java index 95d32161b36..0fa4a74b61a 100644 --- a/src/java.desktop/share/classes/java/awt/Dialog.java +++ b/src/java.desktop/share/classes/java/awt/Dialog.java @@ -165,18 +165,11 @@ public class Dialog extends Window { /** * An {@code APPLICATION_MODAL} dialog blocks all top-level windows * from the same Java application except those from its own child hierarchy. - * If there are several applets launched in a browser, they can be - * treated either as separate applications or a single one. This behavior - * is implementation-dependent. */ APPLICATION_MODAL, /** * A {@code TOOLKIT_MODAL} dialog blocks all top-level windows run - * from the same toolkit except those from its own child hierarchy. If there - * are several applets launched in a browser, all of them run with the same - * toolkit; thus, a toolkit-modal dialog displayed by an applet may affect - * other applets and all windows of the browser instance which embeds the - * Java runtime environment for this toolkit. + * from the same toolkit except those from its own child hierarchy. */ TOOLKIT_MODAL } diff --git a/src/java.desktop/share/classes/java/awt/EventQueue.java b/src/java.desktop/share/classes/java/awt/EventQueue.java index f79ff285a79..be13548e998 100644 --- a/src/java.desktop/share/classes/java/awt/EventQueue.java +++ b/src/java.desktop/share/classes/java/awt/EventQueue.java @@ -67,15 +67,6 @@ import java.util.concurrent.atomic.AtomicInteger; * dispatched before event A. * *

- * Some browsers partition applets in different code bases into - * separate contexts, and establish walls between these contexts. - * In such a scenario, there will be one {@code EventQueue} - * per context. Other browsers place all applets into the same - * context, implying that there will be only a single, global - * {@code EventQueue} for all applets. This behavior is - * implementation-dependent. Consult your browser's documentation - * for more information. - *

* For information on the threading issues of the event dispatch * machinery, see AWT Threading Issues. diff --git a/src/java.desktop/share/classes/java/awt/Frame.java b/src/java.desktop/share/classes/java/awt/Frame.java index fcdb4d5e032..85ccf3efa45 100644 --- a/src/java.desktop/share/classes/java/awt/Frame.java +++ b/src/java.desktop/share/classes/java/awt/Frame.java @@ -1123,8 +1123,6 @@ public class Frame extends Window implements MenuContainer { /** * Returns an array of all {@code Frame}s created by this application. - * If called from an applet, the array includes only the {@code Frame}s - * accessible by that applet. *

* Warning: this method may return system created frames, such * as a shared, hidden frame which is used by Swing. Applications diff --git a/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java b/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java index 4936d5d396d..ecaf5ae4e27 100644 --- a/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java +++ b/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java @@ -292,8 +292,7 @@ public abstract class GraphicsEnvironment { * be used in constructing new {@code Font}s by name or family name, * and is enumerated by {@link #getAvailableFontFamilyNames} and * {@link #getAllFonts} within the execution context of this - * application or applet. This means applets cannot register fonts in - * a way that they are visible to other applets. + * application. *

* Reasons that this method might not register the font and therefore * return {@code false} are: diff --git a/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java b/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java index ede4d385a80..6c6e4044131 100644 --- a/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java +++ b/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java @@ -71,16 +71,6 @@ import sun.awt.AWTAccessor; * dispatcher for all FocusEvents, WindowEvents related to focus, and * KeyEvents. *

- * Some browsers partition applets in different code bases into separate - * contexts, and establish walls between these contexts. In such a scenario, - * there will be one KeyboardFocusManager per context. Other browsers place all - * applets into the same context, implying that there will be only a single, - * global KeyboardFocusManager for all applets. This behavior is - * implementation-dependent. Consult your browser's documentation for more - * information. No matter how many contexts there may be, however, there can - * never be more than one focus owner, focused Window, or active Window, per - * ClassLoader. - *

* Please see * * How to Use the Focus Subsystem, @@ -1177,7 +1167,7 @@ public abstract class KeyboardFocusManager * following: *