SlideShare uma empresa Scribd logo
1 de 18
PRESENTATION

      ON


LAYOUT MANAGERS
INTRODUCTION
   Java uses Layout Managers to define the location
    and size of Graphical User Interface components.



   Java technology uses Layout Managers to define
    the location and size of Graphical User Interface
    components.. A Layout Manager implements a
    layout policy that defines constraints between
    components in a container.
TYPES OF LAYOUT MANAGER
Java technology provides the following Layout
Managers, each of which implements the Layout
Manager interface:

 Flow Layout
 Grid Layout

 Border Layout

 CardLayout
DEFAULT LAYOUT MANAGER


   The FlowLayout is the default Layout Manager for
    Panel, and hence the Applet class. The
    BorderLayout is the default Layout Manager for
    Window class and its subclasses (Frame and
    Dialog).
SETTING LAYOUT MANAGERS

   The following method defined in the Container class
    can be used for setting layout managers.



        void setLayout(LayoutManager mgr);
FLOWLAYOUT MANAGER


   FlowLayout places component in rows from left to
    right. Components towards the end of row are
    written on next row, if there is not enough space in
    the current row. The FlowLayout honors the
    specified size of a component.
CONTD….


   The following constructors of FlowLayout are
    provided by AWT –

        FlowLayout();
        FlowLayout(int alignment);
        FlowLayout(int alignment, int hor_gap, int
        ver_gap);
CONTD….
GRIDLAYOUT MANAGER

   A Grid Layout Manager places the components in a
    rectangular grid. Each component's position is
    identified by a column and row. All the cells in the
    grid have same size and width. Each component is
    stretched to the cell size. So a Grid Layout ignores
    the Component's preferred size.
CONTD….

The GridLayout class provides the following
constructors:



      GridLayout();
      GridLayout(int rows, int columns);
      GridLayout(int rows, int columns, int
      hor_gap, int ver_gap);
CONTD….
BORDERLAYOUT MANAGER


   A BorderLayout Manager divides the window into
    five regions - North, East, West, South and Center.
    A component can be explicitly added to one of the
    regions using the add() method of the Container
    class. Any space left over by the component in
    North, East, South and West is occupied by the
    component in Center.
CONTD:
   The BorderLayout class defines the following
    constructors :



        BorderLayout();
        BorderLayout(int hor_gap, int ver_gap);
CONTD…
CARD LAYOUT
   The CardLayout class is unique among the other
    layout managers in that it stores several different
    layouts. Each layout can be thought of as being on
    a separate index card in a deck that can be shuffled
    so that any card is on top at a given time.
CARD LAYOUT

CardLayout provides these two constructors:

 CardLayout( )
 CardLayout(int horz, int vert)
CONTD…
THANK YOU

Mais conteúdo relacionado

Mais procurados

Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1PRN USM
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)Bilal Amjad
 
JAVA GUI PART I
JAVA GUI PART IJAVA GUI PART I
JAVA GUI PART IOXUS 20
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Javababak danyal
 
Java Swing JFC
Java Swing JFCJava Swing JFC
Java Swing JFCSunil OS
 
Understanding layout managers
Understanding layout managersUnderstanding layout managers
Understanding layout managersNuha Noor
 
java-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of appletjava-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of appletraksharao
 
Dr. Rajeshree Khande :Introduction to Java AWT
Dr. Rajeshree Khande :Introduction to Java AWTDr. Rajeshree Khande :Introduction to Java AWT
Dr. Rajeshree Khande :Introduction to Java AWTDrRajeshreeKhande
 
The AWT and Swing
The AWT and SwingThe AWT and Swing
The AWT and Swingadil raja
 

Mais procurados (20)

GUI Programming with Java
GUI Programming with JavaGUI Programming with Java
GUI Programming with Java
 
Awt controls ppt
Awt controls pptAwt controls ppt
Awt controls ppt
 
Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)
 
JAVA GUI PART I
JAVA GUI PART IJAVA GUI PART I
JAVA GUI PART I
 
Swing
SwingSwing
Swing
 
Java swing
Java swingJava swing
Java swing
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Java
 
Awt
AwtAwt
Awt
 
swingbasics
swingbasicsswingbasics
swingbasics
 
Gui
GuiGui
Gui
 
Java Swing JFC
Java Swing JFCJava Swing JFC
Java Swing JFC
 
java swing
java swingjava swing
java swing
 
Understanding layout managers
Understanding layout managersUnderstanding layout managers
Understanding layout managers
 
java-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of appletjava-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of applet
 
Dr. Rajeshree Khande :Introduction to Java AWT
Dr. Rajeshree Khande :Introduction to Java AWTDr. Rajeshree Khande :Introduction to Java AWT
Dr. Rajeshree Khande :Introduction to Java AWT
 
tL19 awt
tL19 awttL19 awt
tL19 awt
 
GUI programming
GUI programmingGUI programming
GUI programming
 
The AWT and Swing
The AWT and SwingThe AWT and Swing
The AWT and Swing
 
Java swing
Java swingJava swing
Java swing
 

Destaque

Layouts - Java
Layouts - JavaLayouts - Java
Layouts - Javanjca01
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layoutKrazy Koder
 
Java EE 01-Servlets and Containers
Java EE 01-Servlets and ContainersJava EE 01-Servlets and Containers
Java EE 01-Servlets and ContainersFernando Gil
 
Java Servlets
Java ServletsJava Servlets
Java ServletsEmprovise
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread SynchronizationBenj Del Mundo
 
Layouts in android
Layouts in androidLayouts in android
Layouts in androidDurai S
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsKaml Sah
 
Java and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with ContainersJava and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with ContainersRed Hat Developers
 
Multithreading In Java
Multithreading In JavaMultithreading In Java
Multithreading In Javaparag
 
Java Swing
Java SwingJava Swing
Java SwingShraddha
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in javaAdil Mehmoood
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivityTanmoy Barman
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic ConceptsTony Wong
 
Image encryption and decryption
Image encryption and decryptionImage encryption and decryption
Image encryption and decryptionAashish R
 

Destaque (20)

Java awt
Java awtJava awt
Java awt
 
Layouts - Java
Layouts - JavaLayouts - Java
Layouts - Java
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
 
Java EE 01-Servlets and Containers
Java EE 01-Servlets and ContainersJava EE 01-Servlets and Containers
Java EE 01-Servlets and Containers
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread Synchronization
 
Layouts in android
Layouts in androidLayouts in android
Layouts in android
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - Components
 
Java and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with ContainersJava and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with Containers
 
Multithreading In Java
Multithreading In JavaMultithreading In Java
Multithreading In Java
 
Java swing
Java swingJava swing
Java swing
 
Java Swing
Java SwingJava Swing
Java Swing
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in java
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
java swing tutorial for beginners(java programming tutorials)
java swing tutorial for beginners(java programming tutorials)java swing tutorial for beginners(java programming tutorials)
java swing tutorial for beginners(java programming tutorials)
 
java swing
java swingjava swing
java swing
 
Image Encryption in java ppt.
Image Encryption in java ppt.Image Encryption in java ppt.
Image Encryption in java ppt.
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
Image encryption and decryption
Image encryption and decryptionImage encryption and decryption
Image encryption and decryption
 

Semelhante a Java

java-layoutmanager-151027135512-lva1-app6892.pdf
java-layoutmanager-151027135512-lva1-app6892.pdfjava-layoutmanager-151027135512-lva1-app6892.pdf
java-layoutmanager-151027135512-lva1-app6892.pdfssuserec53e73
 
Layout managementand event handling
Layout managementand event handlingLayout managementand event handling
Layout managementand event handlingCharli Patel
 
Java gives us layout managers whose responsibility it is to determine.docx
Java gives us layout managers whose responsibility it is to determine.docxJava gives us layout managers whose responsibility it is to determine.docx
Java gives us layout managers whose responsibility it is to determine.docxolsenlinnea427
 
Text Component FeaturesThe JTextComponent class is the foundation .pdf
Text Component FeaturesThe JTextComponent class is the foundation .pdfText Component FeaturesThe JTextComponent class is the foundation .pdf
Text Component FeaturesThe JTextComponent class is the foundation .pdfaquadreammail
 
8layout Managers
8layout Managers8layout Managers
8layout ManagersAdil Jafri
 
Java GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdfJava GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdfPBMaverick
 
Java Graphics Programming
Java Graphics ProgrammingJava Graphics Programming
Java Graphics ProgrammingRiccardo Cardin
 
Java Graphics
Java GraphicsJava Graphics
Java GraphicsShraddha
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWTbackdoor
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01JONDHLEPOLY
 
3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsb
3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsb3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsb
3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsbabhishekmathuroffici
 
[C++ GUI Programming with Qt4] chap6
[C++ GUI Programming with Qt4] chap6[C++ GUI Programming with Qt4] chap6
[C++ GUI Programming with Qt4] chap6Picker Weng
 
A rendering architecture
A rendering architectureA rendering architecture
A rendering architectureSungkwan Park
 
Abstract Window Toolkit
Abstract Window ToolkitAbstract Window Toolkit
Abstract Window ToolkitRutvaThakkar1
 
Advanced Java programming
Advanced Java programmingAdvanced Java programming
Advanced Java programmingvanmathy1
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01Ankit Dubey
 

Semelhante a Java (20)

java-layoutmanager-151027135512-lva1-app6892.pdf
java-layoutmanager-151027135512-lva1-app6892.pdfjava-layoutmanager-151027135512-lva1-app6892.pdf
java-layoutmanager-151027135512-lva1-app6892.pdf
 
Module 2
Module 2Module 2
Module 2
 
Layout managementand event handling
Layout managementand event handlingLayout managementand event handling
Layout managementand event handling
 
Java gives us layout managers whose responsibility it is to determine.docx
Java gives us layout managers whose responsibility it is to determine.docxJava gives us layout managers whose responsibility it is to determine.docx
Java gives us layout managers whose responsibility it is to determine.docx
 
Text Component FeaturesThe JTextComponent class is the foundation .pdf
Text Component FeaturesThe JTextComponent class is the foundation .pdfText Component FeaturesThe JTextComponent class is the foundation .pdf
Text Component FeaturesThe JTextComponent class is the foundation .pdf
 
8layout Managers
8layout Managers8layout Managers
8layout Managers
 
Java GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdfJava GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdf
 
LayoutManager_Lec1.pptx
LayoutManager_Lec1.pptxLayoutManager_Lec1.pptx
LayoutManager_Lec1.pptx
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Java Graphics Programming
Java Graphics ProgrammingJava Graphics Programming
Java Graphics Programming
 
Java Graphics
Java GraphicsJava Graphics
Java Graphics
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWT
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsb
3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsb3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsb
3_ppt_Layout.pptxgßbdbdbdbsbsbsbbsbsbsbsbsb
 
[C++ GUI Programming with Qt4] chap6
[C++ GUI Programming with Qt4] chap6[C++ GUI Programming with Qt4] chap6
[C++ GUI Programming with Qt4] chap6
 
A rendering architecture
A rendering architectureA rendering architecture
A rendering architecture
 
Abstract Window Toolkit
Abstract Window ToolkitAbstract Window Toolkit
Abstract Window Toolkit
 
Advanced Java programming
Advanced Java programmingAdvanced Java programming
Advanced Java programming
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
UNIT-2-AJAVA.pdf
UNIT-2-AJAVA.pdfUNIT-2-AJAVA.pdf
UNIT-2-AJAVA.pdf
 

Mais de Anand Grewal

Mais de Anand Grewal (13)

distributed dbms
distributed dbmsdistributed dbms
distributed dbms
 
Transaction concurrency control
Transaction concurrency controlTransaction concurrency control
Transaction concurrency control
 
Object modeling
Object modelingObject modeling
Object modeling
 
Object analysis and design
Object analysis and designObject analysis and design
Object analysis and design
 
Object modeling
Object modelingObject modeling
Object modeling
 
O ops concepts
O ops conceptsO ops concepts
O ops concepts
 
System design
System designSystem design
System design
 
Presentation12
Presentation12Presentation12
Presentation12
 
Presentation1
Presentation1Presentation1
Presentation1
 
Event handling
Event handlingEvent handling
Event handling
 
Isp
IspIsp
Isp
 
Pptemail
PptemailPptemail
Pptemail
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dns
 

Último

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Último (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Java

  • 1. PRESENTATION ON LAYOUT MANAGERS
  • 2. INTRODUCTION  Java uses Layout Managers to define the location and size of Graphical User Interface components.  Java technology uses Layout Managers to define the location and size of Graphical User Interface components.. A Layout Manager implements a layout policy that defines constraints between components in a container.
  • 3. TYPES OF LAYOUT MANAGER Java technology provides the following Layout Managers, each of which implements the Layout Manager interface:  Flow Layout  Grid Layout  Border Layout  CardLayout
  • 4. DEFAULT LAYOUT MANAGER  The FlowLayout is the default Layout Manager for Panel, and hence the Applet class. The BorderLayout is the default Layout Manager for Window class and its subclasses (Frame and Dialog).
  • 5. SETTING LAYOUT MANAGERS  The following method defined in the Container class can be used for setting layout managers. void setLayout(LayoutManager mgr);
  • 6. FLOWLAYOUT MANAGER  FlowLayout places component in rows from left to right. Components towards the end of row are written on next row, if there is not enough space in the current row. The FlowLayout honors the specified size of a component.
  • 7. CONTD….  The following constructors of FlowLayout are provided by AWT – FlowLayout(); FlowLayout(int alignment); FlowLayout(int alignment, int hor_gap, int ver_gap);
  • 9. GRIDLAYOUT MANAGER  A Grid Layout Manager places the components in a rectangular grid. Each component's position is identified by a column and row. All the cells in the grid have same size and width. Each component is stretched to the cell size. So a Grid Layout ignores the Component's preferred size.
  • 10. CONTD…. The GridLayout class provides the following constructors: GridLayout(); GridLayout(int rows, int columns); GridLayout(int rows, int columns, int hor_gap, int ver_gap);
  • 12. BORDERLAYOUT MANAGER  A BorderLayout Manager divides the window into five regions - North, East, West, South and Center. A component can be explicitly added to one of the regions using the add() method of the Container class. Any space left over by the component in North, East, South and West is occupied by the component in Center.
  • 13. CONTD:  The BorderLayout class defines the following constructors : BorderLayout(); BorderLayout(int hor_gap, int ver_gap);
  • 15. CARD LAYOUT  The CardLayout class is unique among the other layout managers in that it stores several different layouts. Each layout can be thought of as being on a separate index card in a deck that can be shuffled so that any card is on top at a given time.
  • 16. CARD LAYOUT CardLayout provides these two constructors:  CardLayout( )  CardLayout(int horz, int vert)