Báo cáo tài liệu vi phạm
Giới thiệu
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
THỊ TRƯỜNG NGÀNH HÀNG
NÔNG NGHIỆP, THỰC PHẨM
Gạo
Rau hoa quả
Nông sản khác
Sữa và sản phẩm
Thịt và sản phẩm
Dầu thực vật
Thủy sản
Thức ăn chăn nuôi, vật tư nông nghiệp
CÔNG NGHIỆP
Dệt may
Dược phẩm, Thiết bị y tế
Máy móc, thiết bị, phụ tùng
Nhựa - Hóa chất
Phân bón
Sản phẩm gỗ, Hàng thủ công mỹ nghệ
Sắt, thép
Ô tô và linh kiện
Xăng dầu
DỊCH VỤ
Logistics
Tài chính-Ngân hàng
NGHIÊN CỨU THỊ TRƯỜNG
Hoa Kỳ
Nhật Bản
Trung Quốc
Hàn Quốc
Châu Âu
ASEAN
BẢN TIN
Bản tin Thị trường hàng ngày
Bản tin Thị trường và dự báo tháng
Bản tin Thị trường giá cả vật tư
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
NGÀNH HÀNG
NÔNG NGHIỆP, THỰC PHẨM
Gạo
Rau hoa quả
Nông sản khác
Sữa và sản phẩm
Thịt và sản phẩm
Dầu thực vật
Thủy sản
Thức ăn chăn nuôi, vật tư nông nghiệp
CÔNG NGHIỆP
Dệt may
Dược phẩm, Thiết bị y tế
Máy móc, thiết bị, phụ tùng
Nhựa - Hóa chất
Phân bón
Sản phẩm gỗ, Hàng thủ công mỹ nghệ
Sắt, thép
Ô tô và linh kiện
Xăng dầu
DỊCH VỤ
Logistics
Tài chính-Ngân hàng
NGHIÊN CỨU THỊ TRƯỜNG
Hoa Kỳ
Nhật Bản
Trung Quốc
Hàn Quốc
Châu Âu
ASEAN
BẢN TIN
Bản tin Thị trường hàng ngày
Bản tin Thị trường và dự báo tháng
Bản tin Thị trường giá cả vật tư
Thông tin
Tài liệu Xanh là gì
Điều khoản sử dụng
Chính sách bảo mật
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Java™ How to Program ( Deitel - Deitel) - Phần 8
Đang chuẩn bị liên kết để tải về tài liệu:
Java™ How to Program ( Deitel - Deitel) - Phần 8
Hữu Khôi
70
50
pdf
Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG
Tải xuống
Tham khảo sách 'java™ how to program ( deitel - deitel) - phần 8', 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ả | 1 Fig. 4.20 DrawPanelTest.java 2 Application to display a DrawPanel. 3 import javax.swing.JFrame 4 5 public class DrawPanelTest 6 7 public static void main String args 8 9 create a panel that contains our drawing 10 DrawPanel panel new DrawPanel 11 12 create a new frame to hold the panel 13 JFrame application new JFrame 14 15 set the frame to exit when it is closed 16 application.setDefaultCloseOperation JFrame.EXIT ON CLOSE 17 18 application.add panel add the panel to the frame 19 application.setSize 250 250 set the size of the frame 20 application.setVisible true make the frame visible 21 end main 22 end class DrawPanelTest Line 6 uses the keyword extends to indicate that class DrawPanel is an enhanced type of JPanel. The keyword extends represents a so-called inheritance relationship in which our new class DrawPanel begins with the existing members data and methods from class JPanel. The class from which DrawPanel inherits JPanel appears to the right of keyword extends. In this inheritance relationship JPanel is called the superclass and DrawPanel is called the subclass. This results in a DrawPanel class that has the attributes data and behaviors methods of class JPanel as well as the new features we are adding in our DrawPanel class declaration specifically the ability to draw two lines along the diagonals of the panel . Inheritance will be explained in more detail in Chapter 9. Page 159 Every JPanel including our DrawPanel has a paintComponent method lines 922 which the system automatically calls every time it needs to display the JPanel. Method paintComponent must be declared as shown on line 9otherwise the system will not call the method. This method is called when a JPanel is first displayed on the screen when it is covered then uncovered by a window on the screen and when the window in which it appears is resized. Method paintComponent requires one argument a Graphics object that is provided for you by the system when it calls paintComponent. The first .
TÀI LIỆU LIÊN QUAN
Java™ How to Program ( Deitel - Deitel) - Phần 1
Java™ How to Program ( Deitel - Deitel) - Phần 2
Java™ How to Program ( Deitel - Deitel) - Phần 3
Java™ How to Program ( Deitel - Deitel) - Phần 4
Java™ How to Program ( Deitel - Deitel) - Phần 5
Java™ How to Program ( Deitel - Deitel) - Phần 6
Java™ How to Program ( Deitel - Deitel) - Phần 7
Java™ How to Program ( Deitel - Deitel) - Phần 8
Java™ How to Program ( Deitel - Deitel) - Phần 9
Java™ How to Program ( Deitel - Deitel) - Phần 10
Đã 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.