tailieunhanh - Lecture Object Oriented Programing - Chapter 11: GUI components

After studying this chapter you will be able to understand: The design principles of graphical user interfaces (GUIs), to build GUIs and handle events generated by user interactions with GUIs, to understand the packages containing GUI components, event-handling classes and interfaces, to create and manipulate buttons, labels, lists, text fields and panels, to handle mouse events and keyboard events, to use layout managers to arrange GUI components. | 11 GUI Components: Part 1 Do you think I can listen all day to such stuff? Lewis Carroll Even a minor event in the life of a child is an event of that child’s world and thus a world event. Gaston Bachelard You pays your money and you takes your choice. Punch Guess if you can, choose if you dare. Pierre Corneille OBJECTIVES In this chapter you will learn: The design principles of graphical user interfaces (GUIs). To build GUIs and handle events generated by user interactions with GUIs. To understand the packages containing GUI components, event-handling classes and interfaces. To create and manipulate buttons, labels, lists, text fields and panels. To handle mouse events and keyboard events. To use layout managers to arrange GUI components Introduction Simple GUI-Based Input/Output with JOptionPane Overview of Swing Components Displaying Text and Images in a Window Text Fields and an Introduction to Event Handling with Nested Classes Common GUI | 11 GUI Components: Part 1 Do you think I can listen all day to such stuff? Lewis Carroll Even a minor event in the life of a child is an event of that child’s world and thus a world event. Gaston Bachelard You pays your money and you takes your choice. Punch Guess if you can, choose if you dare. Pierre Corneille OBJECTIVES In this chapter you will learn: The design principles of graphical user interfaces (GUIs). To build GUIs and handle events generated by user interactions with GUIs. To understand the packages containing GUI components, event-handling classes and interfaces. To create and manipulate buttons, labels, lists, text fields and panels. To handle mouse events and keyboard events. To use layout managers to arrange GUI components Introduction Simple GUI-Based Input/Output with JOptionPane Overview of Swing Components Displaying Text and Images in a Window Text Fields and an Introduction to Event Handling with Nested Classes Common GUI Event Types and Listener Interfaces How Event Handling Works JButton Buttons That Maintain State JCheckBox JRadioButton JComboBox and Using an Anonymous Inner Class for Event Handling JList Multiple-Selection Lists Mouse Event Handling Adapter Classes JPanel Sublcass for Drawing with the Mouse Key-Event Handling Layout Managers FlowLayout BorderLayout GridLayout Using Panels to Manage More Complex Layouts JTextArea Wrap-Up Introduction Graphical user interface (GUI) Presents a user-friendly mechanism for interacting with an application Often contains title bar, menu bar containing menus, buttons and combo boxes Built from GUI components Look-and-Feel Observation Consistent user interfaces enable a user to learn new applications faster. Fig. | Internet Explorer window with GUI components. button menus title bar menu bar combo box scroll .

TÀI LIỆU LIÊN QUAN