Core Java - [Java LayoutManagers]

♠ Posted by Unknown in at 11:25

Java Layout Managers


The AWT components are placed in containers. Each container has a layout manager to arrange the AWT components within the container. Java knows where to place button because the layout manager works behind the scenes to place the components in the correct locations. The AWT provides five layout managers: 
  1. FlowLayout 
  2. GridLayout
  3. GridBagLayout
  4. BorderLayout
  5. CardLayout 

These classes implement the LayoutManager interface.

The layout managers are defined by implementing the LayoutManager interface. The LayoutManager interface defines the common methods that each layout manager uses to arrange components. The common methods are add() and remove(). Use the add() method to add a component to the container and the remove() method to remove a component from the container.

1 comments:

Thanks for Sharing this valuble information and itis useful for me and CORE JAVA learners.We also provides the best Online CORE JAVA Training classes.

Post a Comment