31.4. Case Study - Modifying Rows and Columns

 
[Page 917]

Chapter 28. Containers, Layout Managers, and Borders

Mayan God Shel, Mexico. Photographer: Philip Coblentz. Courtesy Brand X Pictures.

Objectives

  • To know the internal structures of the Swing container ( §28.2).

  • To understand how a layout manager works in Java ( §28.3).

  • To know how to use CardLayout , GridBagLayout , BoxLayout , LayeredLayout , and SpringLayout ( §28.3).

  • To create custom layout managers ( §28.4).

  • To use JScrollPane to create scroll panes ( §28.5).

  • To use JTabbedPane to create tabbed panes ( §28.6).

  • To use JSplitPane to create split panes ( §28.7).

  • To use various borders for Swing components ( §28.8).

  • (Optional) To use Swing pluggable look-and-feel ( §28.9).


[Page 918]

28.1. Introduction

Chapter 12, "GUI Basics," introduced the concept of containers and the role of layout managers. You learned how to add components into a container and how to use FlowLayout , BorderLayout , and GridLayout to arrange components in a container. A container is an object that holds and groups components. A layout manager is a special object used to place components in a container. Containers and layout managers play a crucial role in creating user interfaces. This chapter presents a conceptual overview of containers, reviews the layout managers in Java, and introduces several new containers and layout managers. You will also learn how to create custom layout managers and use various borders.

 


Introduction to Java Programming-Comprehensive Version
Introduction to Java Programming-Comprehensive Version (6th Edition)
ISBN: B000ONFLUM
EAN: N/A
Year: 2004
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net