What is an applet?
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。
了解热门 Java Applet 面试题与答案,帮助应届生和有经验的候选人为求职面试做好准备。
了解热门 Java Applet 面试题与答案,帮助应届生和有经验的候选人为求职面试做好准备。
搜索问题以查看答案。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
Write my initialization code in the applets init method or applet constructor.
收藏此条目、标记为困难题,或将其加入复习集合。
1. Place the .class file in the directory containing the HTML document into which you want to insert the applet.
2. Copy the tag from your applet implementation or examples to the clipboard.
3. In FrontPage select the "HTML" tab from the lower left hand corner.
4. Paste the <applet>...</applet> tag in an appropriate place between the <body> and </body> tags. You'll find a gray box with the aqua letter "J" in the "Normal" view indicating the the applet tag has been inserted.
5. To see the applet appearance select the "Preview" tab.
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
methods in the life cycle of an Applet:
收藏此条目、标记为困难题,或将其加入复习集合。
When an applet begins, the AWT calls the following methods, in this sequence:
When an applet is terminated, the following sequence of method calls takes place:
收藏此条目、标记为困难题,或将其加入复习集合。
Following are the main differences:
Application: Stand Alone, doesn't need web-browser.
Applet: Needs no explicit installation on local machine. Can be transferred through Internet on to the local machine and may run as part of web-browser.
Application: Execution starts with main() method. Doesn't work if main is not there.
Applet: Execution starts with init() method.
Application: May or may not be a GUI.
Applet: Must run within a GUI (Using AWT). This is essential feature of applets.
收藏此条目、标记为困难题,或将其加入复习集合。
We can pass parameters to an applet usingtag in the following way:
<param name="param1″ value="value1″><param name="param2″ value="value2″>Access those parameters inside the applet is done by calling getParameter() method inside the applet. Note that getParameter() method returns String value corresponding to the parameter name.
收藏此条目、标记为困难题,或将其加入复习集合。
Since 2.00 version our applets support an user-defined delimiter for the menu arguments. To modify the default delimiter add the following parameter (you can use any character as a delimiter):
<param name="delimiter" value="~"> and use it within "menuItems":
<param name="menuItems" value=" {Home~http://www.withoutbook.com/index.php} {Features, Setup~http://www.globalguideline.com/} ">
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
Use the parseInt() method in the Integer Class, the Float(String) constructor or parseFloat() method in the Class Float, or the
Double(String) constructor or parseDoulbl() method in the class Double.
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
Use the getSize() method, which the Applet class inherits from the Component class in the Java.awt package. The getSize() method returns the size of the applet as a Dimension object, from which you extract separate width, height fields. The following code snippet explains this:
Dimension dim = getSize();
int appletwidth = dim.width();
int appletheight = dim.height();
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
收藏此条目、标记为困难题,或将其加入复习集合。
Ask the applet for its applet context and invoke showDocument() on that context object.
URL targetURL;
String URLString;
AppletContext context = getAppletContext();
try
{
targetURL = new URL(URLString);
}
catch (MalformedURLException e)
{
// Code for recover from the exception
}
context. showDocument (targetURL);
收藏此条目、标记为困难题,或将其加入复习集合。