tailieunhanh - Black Art of Java Game Programming PHẦN 4

Sử dụng Java, bạn sẽ cho phép người chơi từ khắp nơi trên thế giới để cạnh tranh đối với một Tạo ra một hoạt hình đơn giản Multithreaded Hãy tạo ra một applet hoạt hình đa luồng. Mặc dù ví dụ này là đơn giản, nó sẽ làm nổi bật sự khác biệt của chương trình với chủ đề. | Black Art of Java Game Programming Creating Customizable Games with the AWT Selected methods in the abstract class Container are listed in Table 7-12. Table 7-12Container methods Container Methods Purpose public Component add Component c public Component add String s Component c public Insets insets public void setLayout LayoutManager m public synchronized void remove Component c public synchronized void removeAll Adds the specified component Adds component with String argument Creates insets Uses the specified layout manager Removes the specified component Removes all components from container Components Table 7-13 lists the components we ve discussed in this chapter and selected methods that are available. Remember that these classes also inherit the Component methods listed above. Table 7-13Components Class Methods Button public Button public Button String label public String getLabel public void setLabel String label Checkbox public Checkbox public Checkbox String label public Checkbox String label CheckboxGroup group boolean state public String getLabel public boolean getState public void setLabel String label public void setState booleanstate file D Downloads Books Computer Java 20Game 20Programming ch07 2 von 4 13 18 24 Black Art of Java Game Programming Creating Customizable Games with the AWT CheckboxGroup public CheckboxGroup public Checkbox getCurrent public synchronized void setCurrent Checkbox box Label public Label public Label String label public Label String label int alignment public int getAlignment public String getText public void setAlignment intalignment public void setText String label TextField public Textfield public Textfield int size public Textfield String text intsize public String getText inherited from TextComponent public setText String text inherited from TextComponent Containers Table 7-14 lists the containers discussed in this chapter and selected methods that are available. Table 7-14Container

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.