TAILIEUCHUNG - Introduction to Java: 14 And Then There Were Applets

Tham khảo tài liệu 'introduction to java: 14 and then there were applets', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 14 In this chapter What s a Java Applet AudioClip Interface AppletContext Interface AppletStub Interface Audio in Applications And Then There Were Applets Although it is not part of the package the package is closely related. The package provides support for running an applet in the context of a World Wide Web browser. It consists of one class Applet and three interfaces AppletContext AudioClip and Appletstub . The Applet class supports the applet life cycle methods init start stop destroy that you override to write an applet. AudioClip provides support for audio within applets. Applications use the package for audio support is also covered in this chapter. The Appletstub and AppletContext interfaces provide a way for the applet to interact with its run-time environment. Many of the methods of Appletstub and AppletContext are duplicated in the Applet class. What s a Java Applet Much of the initial excitement about Java centered around applets. Applets are small Java programs that can be embedded within HTML pages and downloaded and executed by a web browser. Because executing code from random Internet sites presents a security risk Java goes to great lengths to ensure the integrity of the program executing and to prevent it from performing any unauthorized tasks. An applet is a specific type of Java Container. The class hierarchy of an applet is shown in Figure 14-1. When you are writing an applet remember that you can use the features of its ancestors. In particular remember to check the methods of the Component Container and Panel classes which are inherited by the Applet class. 470 What s a Java Applet 471 Figure 14 1 Applet class hierarchy Applet Methods All the methods of Applet except setStub either need to be overridden or are methods based on one of the interfaces. The system calls setStub to set up the context of the interfaces. The browser implements the AppletContext and .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.