TAILIEUCHUNG - Lecture An introduction to Object-Oriented Programming with Java - Chapter 7: Event-driven programming and basic GUI objects

Event-driven programming and basic GUI objects: Define a subclass of the JFrame class, using inheritance; write graphical user interface (GUI) application programs using JButton, JLabel, ImageIcon, JTextField, and JTextArea objects from the package;. | Chapter 7 Event-Driven Programming and Basic GUI Objects Chapter 7 Objectives After you have read and studied this chapter, you should be able to Define a subclass of the JFrame class, using inheritance. Write graphical user interface (GUI) application programs using JButton, JLabel, ImageIcon, JTextField, and JTextArea objects from the package. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Objectives After you have read and studied this chapter, you should be able to Write GUI application programs with menus, using menu objects from the package. Write event-driven programs, using Java’s delegation-based event model. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction This chapter covers the graphical user interface (GUI). In Java, GUI-based programs are implemented by using classes from the and packages. The Swing classes provide greater compatibility across different operating systems. They are fully implemented in Java, and behave the same on different operating systems. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. Various GUI objects from the package. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction AWT classes are implemented by using the native GUI objects. Swing classes support many new functionalities not supported by AWT counterparts. Do not mix the counterparts in the same program because of their differences in implementation. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction To build an effective GUI using objects from the Swing and AWT packages, we must learn a new style of program control called event-driven programming. An event occurs when the user interacts with a GUI object. In event-driven programs, we program objects to respond to these events by defining event-handling .

Đã 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.