Slides0306 - COP 3330 Slides 3/6 Topics Layout Managers...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
COP 3330 Slides 3/6
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Topics Layout Managers overview
Background image of page 2
Layout Managers This is a general overview of layout managers – lots of detail and help online This is a general overview of pros, cons, so you have broad knowledge Several common ones, several more obscure ones, several very specific ones
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Layout Managers Good for managing GUIs Sometimes flexible and useful – sometimes not Picking the right one is important Layout Managers often have little idiosyncrasies (Javadocs become very helpful)
Background image of page 4
General Use 1. Construct a layout manager 2. Configure layout manager 3. Set a component’s layout manager 4. Add things to component (5). Component works with layout manager to figure out where stuff goes Some exceptions to 4 & 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
General Use All layouts implement the LayoutManager interface Allows components to simply tell the LayoutManager to “layoutComponents”, and it works
Background image of page 6
Hierarchical layouts Hierarchical layouts of different types can be very useful Set layout A on a frame Add a component in that frame Set that component to use layout B Add things to component Very powerful to use simple layout managers like this
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Null Layout Not really a layout component.setLayout(null); Tells component not to mess with your stuff Set exact pixel locations/sizes on individual objects
Background image of page 8
Null Layout Example First: component.setLayout(null); Then you can say: button.setLocation(25, 25); button.setSize(25, 25); component.add(button);
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Null Layout Pros Very exact – usually easy to find problems No “hard stuff” – stuff just goes exactly where you tell it to go
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/09/2010 for the course CS COP 3330 taught by Professor Douglass during the Spring '09 term at University of Central Florida.

Page1 / 32

Slides0306 - COP 3330 Slides 3/6 Topics Layout Managers...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online