网站大量收购闲置独家精品文档,联系QQ:2885784924

福建农林大学计算机与信息学院JAVA语言程序设计课件Chapter18 Applets and Multimedia.ppt

福建农林大学计算机与信息学院JAVA语言程序设计课件Chapter18 Applets and Multimedia.ppt

  1. 1、本文档共31页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
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

您可能关注的文档

文档评论(0)

ormition + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档