Abstract
In Java, you can use the java.awt.Container class and its subclasses to display groups of Swing components. For example, you might use a JPanel to display a related set of buttons or add components to a JFrame. Layout managers are classes that control the size and location of each component that’s added to a container, and in most cases a layout manager is also responsible for determining the sizes returned from the container’s getMinimumSize(), getPreferredSize(), and getMaximumSize() methods. Layout managers are important because they simplify the task of positioning and sizing components and because they allow you to create flexible user interfaces.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Brett Spell
About this chapter
Cite this chapter
Spell, B. (2015). Using Layout Managers. In: Pro Java 8 Programming. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0641-6_6
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0641-6_6
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0642-3
Online ISBN: 978-1-4842-0641-6
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)