📄 applet.html
字号:
</DD></DL><HR><A NAME="isActive()"><!-- --></A><H3>isActive</H3><PRE>public boolean <B>isActive</B>()</PRE><DL><DD>Determines if this applet is active. An applet is marked active just before its <code>start</code> method is called. It becomes inactive just before its <code>stop</code> method is called.<DD><DL><DT><B>Returns:</B><DD><code>true</code> if the applet is active; <code>false</code> otherwise.<DT><B>See Also: </B><DD><A HREF="../../java/applet/Applet.html#start()"><CODE>start()</CODE></A>, <A HREF="../../java/applet/Applet.html#stop()"><CODE>stop()</CODE></A></DL></DD></DL><HR><A NAME="getDocumentBase()"><!-- --></A><H3>getDocumentBase</H3><PRE>public <A HREF="../../java/net/URL.html">URL</A> <B>getDocumentBase</B>()</PRE><DL><DD>Returns an absolute URL naming the directory of the document in which the applet is embedded. For example, suppose an applet is contained within the document: <blockquote><pre> http://java.sun.com/products/jdk/1.2/index.html </pre></blockquote> The document base is: <blockquote><pre> http://java.sun.com/products/jdk/1.2/ </pre></blockquote><DD><DL><DT><B>Returns:</B><DD>the <A HREF="../../java/net/URL.html"><CODE>URL</CODE></A> of the document that contains this applet.<DT><B>See Also: </B><DD><A HREF="../../java/applet/Applet.html#getCodeBase()"><CODE>getCodeBase()</CODE></A></DL></DD></DL><HR><A NAME="getCodeBase()"><!-- --></A><H3>getCodeBase</H3><PRE>public <A HREF="../../java/net/URL.html">URL</A> <B>getCodeBase</B>()</PRE><DL><DD>Gets the base URL. This is the URL of the applet itself.<DD><DL><DT><B>Returns:</B><DD>the <A HREF="../../java/net/URL.html"><CODE>URL</CODE></A> of this applet.<DT><B>See Also: </B><DD><A HREF="../../java/applet/Applet.html#getDocumentBase()"><CODE>getDocumentBase()</CODE></A></DL></DD></DL><HR><A NAME="getParameter(java.lang.String)"><!-- --></A><H3>getParameter</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getParameter</B>(<A HREF="../../java/lang/String.html">String</A> name)</PRE><DL><DD>Returns the value of the named parameter in the HTML tag. For example, if this applet is specified as <blockquote><pre> <applet code="Clock" width=50 height=50> <param name=Color value="blue"> </applet> </pre></blockquote> <p> then a call to <code>getParameter("Color")</code> returns the value <code>"blue"</code>. <p> The <code>name</code> argument is case insensitive.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a parameter name.<DT><B>Returns:</B><DD>the value of the named parameter, or <code>null</code> if not set.</DL></DD></DL><HR><A NAME="getAppletContext()"><!-- --></A><H3>getAppletContext</H3><PRE>public <A HREF="../../java/applet/AppletContext.html">AppletContext</A> <B>getAppletContext</B>()</PRE><DL><DD>Determines this applet's context, which allows the applet to query and affect the environment in which it runs. <p> This environment of an applet represents the document that contains the applet.<DD><DL><DT><B>Returns:</B><DD>the applet's context.</DL></DD></DL><HR><A NAME="resize(int, int)"><!-- --></A><H3>resize</H3><PRE>public void <B>resize</B>(int width, int height)</PRE><DL><DD>Requests that this applet be resized.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#resize(int, int)">resize</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the new requested width for the applet.<DD><CODE>height</CODE> - the new requested height for the applet.</DL></DD></DL><HR><A NAME="resize(java.awt.Dimension)"><!-- --></A><H3>resize</H3><PRE>public void <B>resize</B>(<A HREF="../../java/awt/Dimension.html">Dimension</A> d)</PRE><DL><DD>Requests that this applet be resized.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#resize(java.awt.Dimension)">resize</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>d</CODE> - an object giving the new width and height.</DL></DD></DL><HR><A NAME="showStatus(java.lang.String)"><!-- --></A><H3>showStatus</H3><PRE>public void <B>showStatus</B>(<A HREF="../../java/lang/String.html">String</A> msg)</PRE><DL><DD>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.<DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - a string to display in the status window.</DL></DD></DL><HR><A NAME="getImage(java.net.URL)"><!-- --></A><H3>getImage</H3><PRE>public <A HREF="../../java/awt/Image.html">Image</A> <B>getImage</B>(<A HREF="../../java/net/URL.html">URL</A> url)</PRE><DL><DD>Returns an <code>Image</code> object that can then be painted on the screen. The <code>url</code> that is passed as an argument must specify an absolute URL. <p> 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.<DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - an absolute URL giving the location of the image.<DT><B>Returns:</B><DD>the image at the specified URL.<DT><B>See Also: </B><DD><A HREF="../../java/awt/Image.html"><CODE>Image</CODE></A></DL></DD></DL><HR><A NAME="getImage(java.net.URL, java.lang.String)"><!-- --></A><H3>getImage</H3><PRE>public <A HREF="../../java/awt/Image.html">Image</A> <B>getImage</B>(<A HREF="../../java/net/URL.html">URL</A> url, <A HREF="../../java/lang/String.html">String</A> name)</PRE><DL><DD>Returns an <code>Image</code> object that can then be painted on the screen. The <code>url</code> argument must specify an absolute URL. The <code>name</code> argument is a specifier that is relative to the <code>url</code> argument. <p> 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.<DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - an absolute URL giving the base location of the image.<DD><CODE>name</CODE> - the location of the image, relative to the <code>url</code> argument.<DT><B>Returns:</B><DD>the image at the specified URL.<DT><B>See Also: </B><DD><A HREF="../../java/awt/Image.html"><CODE>Image</CODE></A></DL></DD></DL><HR><A NAME="newAudioClip(java.net.URL)"><!-- --></A><H3>newAudioClip</H3><PRE>public static final <A HREF="../../java/applet/AudioClip.html">AudioClip</A> <B>newAudioClip</B>(<A HREF="../../java/net/URL.html">URL</A> url)</PRE><DL><DD>Get an audio clip from the given URL.<DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - points to the audio clip<DT><B>Returns:</B><DD>the audio clip at the specified URL.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="getAudioClip(java.net.URL)"><!-- --></A><H3>getAudioClip</H3><PRE>public <A HREF="../../java/applet/AudioClip.html">AudioClip</A> <B>getAudioClip</B>(<A HREF="../../java/net/URL.html">URL</A> url)</PRE><DL><DD>Returns the <code>AudioClip</code> object specified by the <code>URL</code> argument. <p> 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.<DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - an absolute URL giving the location of the audio clip.<DT><B>Returns:</B><DD>the audio clip at the specified URL.<DT><B>See Also: </B><DD><A HREF="../../java/applet/AudioClip.html"><CODE>AudioClip</CODE></A></DL></DD></DL><HR><A NAME="getAudioClip(java.net.URL, java.lang.String)"><!-- --></A><H3>getAudioClip</H3><PRE>public <A HREF="../../java/applet/AudioClip.html">AudioClip</A> <B>getAudioClip</B>(<A HREF="../../java/net/URL.html">URL</A> url, <A HREF="../../java/lang/String.html">String</A> name)</PRE><DL><DD>Returns the <code>AudioClip</code> object specified by the <code>URL</code> and <code>name</code> arguments. <p> 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.<DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - an absolute URL giving the base location of the audio clip.<DD><CODE>name</CODE> - the location of the audio clip, relative to the <code>url</code> argument.<DT><B>Returns:</B><DD>the audio clip at the specified URL.<DT><B>See Also: </B><DD><A HREF="../../java/applet/AudioClip.html"><CODE>AudioClip</CODE></A></DL></DD></DL><HR><A NAME="getAppletInfo()"><!-- --></A><H3>getAppletInfo</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getAppletInfo</B>()</PRE><DL><DD>Returns information about this applet. An applet should override this method to return a <code>String</code> containing information about the author, version, and copyright of the applet. <p> The implementation of this method provided by the <code>Applet</code> class returns <code>null</code>.<DD><DL><DT><B>Returns:</B><DD>a string containing information about the author, version, and copyright of the applet.</DL></DD></DL><HR><A NAME="getLocale()"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -