Owl Teach Yourself Java in 24 Hours, Fifth Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS
ROGERS CADENHEAD

Hour 14: Laying Out a User Interface

Online Interactive Learning Lab

How to create the graphical user interface for the LottoMadness application.

Hour 14 Quiz

Question 1. What container is often used when subdividing an interface into different layout managers?

1.a. JWindow

1.b. JPanel

1.c. Container

JPanel, which is the simplest of the containers.

Question 2. What is the default layout manager for a panel?

2.a. FlowLayout

2.b. GridLayout

2.c. No default

Panels use flow layout, but the default manager for frames, windows, and an applet window is grid layout.

Question 3. The BorderLayout class gets its name from where?

3.a. The border of each component

3.b. The way components are organized along the borders of a container

3.c. Sheer capriciousness on the part of Java's developers

The border position of components must be specified as they are added to a container with the use of directional variables such as BorderLayout.WEST and BorderLayout.EAST.

Notes and Corrections

  • None.

Source Files

Reader Questions

  • None.

Activities

   
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS

Search terms used to find this page: Java programming, teach yourself, 24 hours, how to, learn, Sams, Macmillan, Java2, JDK1.5, Java 1.5, JDK 1.5, SDK1.5, Java 2 SDK 1.5, SDK 1.5, Java 2 version 1.5, J2SE 1.5, J2SE 5, Java 2 Standard Edition 1.5, Java 2 Standard Edition 5, Java 2 SDK, Java SDK, Rogers Cadenhead, tutorial, hands-on, source code, code, javac, java, appletviewer, help, learning, applet, application, Java Plug-in, plugin, Swing, GUI, interface, Java2D, IO, Java Web Start, games, novice, beginner, neophyte, rookie

Valid HTML 4.01!

Valid CSS!