Lecture Object Oriented Programing - Chapter 22: GUI components (cont)

In this chapter you will learn: To create and manipulate sliders, menus, pop-up menus and windows; to change the look-and-feel of a GUI, using Swings pluggable look-and-feel; to create a multiple-document interface with JDesktopPane and JInternalFrame; to use additional layout managers. | 22 GUI Components: Part 2 An actor entering through the door, youve got nothing. But if he enters through the window, youve got a situation. Billy Wilder .the force of events wakes slumberous talents. Edward Hoagland You and I would see more interesting photography if they would stop worrying, and instead, apply horse-sense to the problem of recording the look and feel of their own era. Jessie Tarbox Beals OBJECTIVES In this chapter you will learn: To create and manipulate sliders, menus, pop-up menus and windows. To change the look-and-feel of a GUI, using Swings pluggable look-and-feel. To create a multiple-document interface with JDesktopPane and JInternalFrame. To use additional layout managers. Introduction JSlider Windows: Additional Notes Using Menus with Frames JPopupMenu Pluggable Look-and-Feel JDesktopPane and JInternalFrame JTabbedPane Layout Managers: BoxLayout and GridBagLayout Wrap-Up . | 22 GUI Components: Part 2 An actor entering through the door, youve got nothing. But if he enters through the window, youve got a situation. Billy Wilder .the force of events wakes slumberous talents. Edward Hoagland You and I would see more interesting photography if they would stop worrying, and instead, apply horse-sense to the problem of recording the look and feel of their own era. Jessie Tarbox Beals OBJECTIVES In this chapter you will learn: To create and manipulate sliders, menus, pop-up menus and windows. To change the look-and-feel of a GUI, using Swings pluggable look-and-feel. To create a multiple-document interface with JDesktopPane and JInternalFrame. To use additional layout managers. Introduction JSlider Windows: Additional Notes Using Menus with Frames JPopupMenu Pluggable Look-and-Feel JDesktopPane and JInternalFrame JTabbedPane Layout Managers: BoxLayout and GridBagLayout Wrap-Up Introduction Pluggable look-and-feel (PLAF) Swing can customize the look-and-feel of the GUI Motif A popular UNIX look-and-feel Multiple-document interface (MDI) A main window (the parent window) containing other windows (child windows) Manages several open documents parallel JSlider JSlider Enables the user to select from a range of integer values Inherits from JComponent Contains: Tick marks Can display major tick marks, minor tick marks and labels for tick marks Are not displayed by default Thumb Allows the user to select a value Snap-to ticks Cause the thumb to snap to the closest tick mark Fig. | JSlider component with horizontal orientation. thumb tick mark JSlider (Cont.) If a JSlider has the focus (is the currently selected GUI component in the user interface) Left/right arrow keys cause the thumb of the JSlider to decrease/increase by 1 Down/up arrow keys cause the thumb of the JSlider to decrease/increase by 1 PgDn (page down)/PgUp (page up) keys cause the

Không thể tạo bản xem trước, hãy bấm tải xuống
Đã 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.