- 1、本文档共31页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Introduction to Java Programming Chapter 18 Introduction to Java Progrmming Chapter 18 Applets and Multimedia Motivations When browsing the Web, you frequently see the graphical user interface and animation developed using Java. These programs are called Java applets. Suppose you want to develop a Java applet for the Sudoku game. How do you write this program? Chapter 18 In this chapter, you will learn the following concepts: To convert GUI applications to applets (§18.2). To embed applets in Web pages (§18.3). To run applets from Web browsers and from the appletviewer (§§18.3.1-18.3.2). To write a Java program that can run as both an application and an applet (§18.4). To override the init, start, stop, and destroy methods in the Applet class (§18.5). To pass string values to applets from HTML (§18.6). To develop an applet for the TicTacToe game (§18.7). To develop an animation for a bouncing ball (§18.8). To locate resources (images and audio) using the URL class (§18.9). To play audio in any Java program (§18.10). 18.2 Developing Applets 18.3 The HTML File and the applet Tag First Simple Applet html head titleJava Applet Demo/title /head body applet code = DisplayLabel.class width = 350 height = 200 /applet /body /html Viewing Applets from a Web Browser Viewing Applets Using the Applet Viewer Utility appletviewer 18.4 Applet Security Restrictions Applets are not allowed to read from, or write to, the file system of the computer viewing the applets. Applets are not allowed to run any programs on the browser’s computer. Applets are not allowed to establish connections between the user’s computer and another computer except with the server where the applets are stored. Applications vs. Applets Similarities Since JFrame and JApplet both are subclasses of the Container class, all the user interface components, layout managers, and event-handling features are the same for both classe
您可能关注的文档
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第二十四讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第二十五讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第九讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第六讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第七讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第三讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第三十二讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第三十讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第三十一讲.ppt
- 东华大学计算机科学与技术学院计算机系统与网络技术课件 第十九讲.ppt
- 福建农林大学计算机与信息学院JAVA语言程序设计课件Chapter19 Binary Input and output.ppt
- 福建农林大学交通与土木工程学院混凝土结构设计原理课件第1章 概论.ppt
- 福建农林大学交通与土木工程学院混凝土结构设计原理课件第4章 梁受弯性能试验研究.ppt
- 福建农林大学交通与土木工程学院混凝土结构设计原理课件第9章 受拉构件承载力计算.ppt
- 福建农林大学交通与土木工程学院土力学课件 抗剪强度与土压力例题.ppt
- 福建农林大学交通与土木工程学院土力学课件 土压力(一).ppt
- 福建农林大学交通与土木工程学院土力学课件 绪论(二).ppt
- 福建农林大学交通与土木工程学院土力学课件 绪论(三).ppt
- 福建农林大学交通与土木工程学院土力学课件 绪论(一).ppt
- 福建农林大学交通与土木工程学院土力学课件 压缩性与沉降计算例题.ppt
文档评论(0)