TAILIEUCHUNG - Introduction to Java: 15 Toolkit and Peers

Tham khảo tài liệu 'introduction to java: 15 toolkit and peers', 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ả | In this chapter Toolkit The Peer Interfaces 15 Toolkit and Peers This chapter describes the Toolkit class and the purposes it serves. It also describes the package of interfaces along with how they fit in with the general scheme of things. The most important advice I can give you about the peer interfaces is not to worry about them. Unless you are porting Java to another platform creating your own Toolkit or adding any native component you can ignore the peer interfaces. Toolkit The Toolkit object is an abstract class that provides an interface to platform-specific details like window size available fonts and printing. Every platform that supports Java must provide a concrete class that extends the Toolkit class. The Sun JDK provides a Toolkit for Windows NT 95 or Solaris Motif and Macintosh . Although the Toolkit is used frequently both directly and behind the scenes you would never create any of these objects directly. When you need a Toolkit you ask for it with the static method getDefaultToolkit or the method. You might use the Toolkit object if you need to fetch an image in an application getImage get the font information provided with the Toolkit getFontList or getFontMetrics get the color model getColorModel get the screen metrics getScreenResolution or getScreenSize get the system clipboard getSystemClipboard get a printjob getPrintJob or ring the bell beep . The other methods of Toolkit are called for you by the system. 489 490 Chapter 15 Toolkit and Peers Toolkit Methods Constructors public Toolkit cannot be called by user Because Toolkit is an abstract class it has no usable constructor. To get a Toolkit object ask for your environment s default toolkit by calling the static method getDefaultToolkit or call to get the toolkit of a component. When the actual Toolkit is created for

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.