View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Layout Managers and Containers

    by , 03-04-2012 at 04:26 PM
    A container must contain a layout manager to perform its work. If a layout manager is not associated with a container, the container will place the components wherever specified using following methods.
    A layout manager must be present in a container so that work could be performed. If container and layout manager are not associated with each other, the components will be placed by the container wherever specified by using these methods.

    1. setBounds()
    2. setSize()
    3. setLocation()
    ...
    Categories
    Layout
  2. List of Layout Managers

    by , 03-04-2012 at 10:49 AM
    Pre-defined entire layout manager is present in java.awt. Interface java.awt.LayoutManager is implemented by the layout manager.

    Every AWT i.e Abstract Windows Toolkit & swing container consists of a pre-defined default layout manager.
    • container.setLayout can be used for setting or changing the layout manager.
    • Interface java.awt.LayoutManager is implemented for customized layout manager.


    Layout managers that are pre-defined are given here:
    • java.awt.BorderLayout
    • java.awt.FlowLayout
    • java.awt.CardLayout
    • java.awt.GridLayout
    • java.awt.GridBagLayout
    ...
    Categories
    Layout