levo

Graphical User Interface Objects and Events

Containers, panels and laying out a form

  • 3 things to know
  • AS Unit 2
Start revising · £5/month

Overview

Container in a graphical interface, layout manager and drawback of absolute positioning with fixed coordinates.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is a container in a graphical interface?

Key term

Give two examples of a container.

Key term

Why group related controls onto a panel?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a container in a graphical interface?

    Model answer

    A container is a control whose job is to hold other controls, and a container positions and clips the controls placed inside it.

  2. 2

    Give two examples of a container.

    Model answer

    A form and a panel are both containers.

  3. 3

    Why group related controls onto a panel?

    Model answer

    A panel keeps related controls together so the whole group is moved, hidden or disabled with one instruction, and the grouping helps the user read the form.

  4. 4

    What is a layout manager?

    Model answer

    A layout manager is an object that decides where each control sits inside a container and resizes the controls when the container changes size.

  5. 5

    The Java code pnl.setLayout(null); btn.setBounds(20, 40, 100, 30); runs. Describe where the button sits and how big it is.

    Model answer

    The button sits 20 pixels from the left edge and 40 pixels from the top of the panel, and the button measures 100 pixels wide by 30 pixels tall.

  6. 6

    What is the drawback of absolute positioning with fixed coordinates?

    Model answer

    Absolute positioning keeps every control in the same place when the window is resized or the font changes, so controls are clipped or leave empty space.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Software and the Development Environment
Defining Data: Types, Variables and Classes
Program Control Structures
Objects, Classes and Data Structures

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A null is the of one.
absencepresencetype

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

An error is the mistake a person made.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Graphical User Interface Objects and Events, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.