Đang chuẩn bị liên kết để tải về tài liệu:
THE JR PROGRAMMING LANGUAGE phần 9

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Hình thức chung của báo cáo đầu vào thảo luận tại mục 9.1.1 bao gồm một điều khoản ném tùy chọn như là một phần của mỗi lệnh hoạt động. Một lệnh hoạt động hiện nay có hình thức chung và khung được trộn lẫn trong các đặc điểm kỹ thuật của các thông số chính thức. Ví dụ, sau đây là hợp pháp: | 294 Interfacing JR and GUIs Figure 20.1 gives a screen snapshot of the game.1 It shows two windows on a single system display. As seen each window consists of a menu a button and a board area. Windows are assigned unique identifiers 0 1 2 . and are considered to be ordered left-to-right according to those identifiers. Each board area holds two kinds of toys balls and boxes. The menu and button are used to create new balls. Each menu click creates a single green or orange ball. Each button click creates a blue ball and a red ball. The balls and boxes move within the board area. Each board area is initially assigned a box. Only one box for each window exists during each game. The balls and boxes are labeled with the number of the window from which they originated. The board area also contains a text message which simply moves randomly within the board area. Balls move automatically left to right across the window zig-zagging between the top and bottom. They bounce off the top or bottom effecting a change in their upward or downward direction. Each ball s initial placement within its originating window is randomly chosen. When a ball reaches the right border it moves to the next window on the right according to the ordering on window identifiers or wraps around to the first window. Each ball expires after it has moved a certain number of times. Boxes move under user keyboard control. When a box reaches the left or right border it moves to the previous or next window respectively. Boxes cannot move beyond the top or bottom border. Each box lives for the duration of the game. As noted in the introduction to this chapter the game is fairly simple so as to illustrate the basic concepts in using Swing. Exercises 20.4 and 20.5 suggest how to make the game more interesting. 20.2 BnB Code Overview The BnB program consists of the following classes Main the main program. It creates all the windows in the game. Window represents a window one for each player . It creates the .

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.