tailieunhanh - Introduction to java programming: Chapter 29 - Menus, Toolbars, Dialogs, and Internal Frames

Introduction to java programming: Chapter 29 - Menus, Toolbars, Dialogs, and Internal Frame's Objectives is to create menus; learn the menu components JMenuBar, JMenu, JPopupMenu JMenuItem, JCheckBoxMenuItem, and JRadioButtonMenuItem; create popup menus; use JToolBar to create tool bars. | Chapter 29 Menus Toolbars Dialogs and Internal Frames Liang Introduction to Java Programming Fifth Edition c 2005 Pearson Education Inc. All rights reserved. 0-13-148952-6 1 Objectives To create menus . To learn the menu components JMenuBar JMenu JPopupMenu JMenuItem JCheckBoxMenuItem and JRadioButtonMenultem . To create popup menus . To use JToolBar to create tool bars . To use the Action objects to generalize the code for processing action . To create standard dialogs using the JOptionPane class . To extend the JDialog class to create custom dialogs . To select colors using JColorChooser . To use JFileChooser to display Open and Save File dialogs . To create internal frames using JInternalFrame . Liang Introduction to Java Programming Fifth Edition c 2005 Pearson Education Inc. All 2 rights reserved. 0-13-148952-6 2 Menus Java provides several classes JMenuBar JMenu JMenultem JCheckBoxMenuItem and JRadioButtonMenuItem to implement menus in a frame. A JFrame or JApplet can hold a menu bar to which the pull-down menus are attached. Menus consist of menu items that the user can select or toggle on or off . Menu bars can be viewed as a structure to support menus. Liang Introduction to Java Programming Fifth Edition c 2005 Pearson Education Inc. All rights reserved. 0-13-148952-6