SlideShare a Scribd company logo
1 of 2
Java gives us layout managers whose responsibility it is to determine where on the applet or
application space to put the component you want to add to the GUI interface. There are five
different layout managers. What are the major differences among them? Share your experiences
with layout managers thus far.
Solution
The LayoutManagers are used to arrange components in a particular manner
1. BorderLayout is to arrange objects in one of five geographical locations: "North,"
"South," "East," "West," and "Center," possibly with some padding between. BorderLayout
is the default layout for Window and
Frame objects. Because each component is associated with a direction, BorderLayout can
manage at most five components; it
squashes or stretches those components to fit its constraints.
2. GridLayout arranges components into regularly spaced rows and columns. The components
are arbitrarily resized to fit in the
resulting areas; their minimum and preferred sizes are consequently ignored. GridLayout is most
useful for arranging very
regular, identically sized objects and for allocating space for Panels to hold other layouts in each
region of the container.
3. FlowLayout is a simple layout manager that tries to arrange components with their preferred
sizes, from left to right and top
to bottom in the display. A FlowLayout can have a specified justification of LEFT, CENTER, or
RIGHT, and a fixed horizontal and
vertical padding. By default, a flow layout uses CENTER justification, meaning that all
components are centered within the area
allotted to them. FlowLayout is the default for Panel components like Applet.
4. CardLayout is a special layout manager for creating the effect of a stack of cards. Instead of
arranging all of the
container's components, it displays only one at a time. You would use this kind of layout to
implement a hypercard stack or a
Windows-style set of configuration screens. When you add a component to the layout, you use
the two-argument version of add();
the extra argument is an arbitrary string that serves as the card's name
5. GridBagLayout is a very flexible layout manager that allows you to position components
relative to one another using
constraints. With GridBagLayout (and a fair amount of effort) you can create almost any
imaginable layout. Components are
arranged at "logical" coordinates on a abstract grid. We'll call them "logical" coordinates
because they really designate
positions in the space of rows and columns formed by the set of components. Rows and columns
of the grid stretch to different
sizes, based on the sizes and constraints of the components they hold.

More Related Content

Similar to Java gives us layout managers whose responsibility it is to determine.docx

GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Javayht4ever
 
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
 
View groups containers
View groups containersView groups containers
View groups containersMani Selvaraj
 
RS and GIS TW- 1&2.pdf
RS and GIS TW- 1&2.pdfRS and GIS TW- 1&2.pdf
RS and GIS TW- 1&2.pdfSatishKhadse3
 
Understanding layout managers
Understanding layout managersUnderstanding layout managers
Understanding layout managersNuha Noor
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfAbdullahMunir32
 
Introduction to silverlight control 3
Introduction to silverlight control  3Introduction to silverlight control  3
Introduction to silverlight control 3msarangam
 
MySQL Cluster page management (2014)
MySQL Cluster page management (2014)MySQL Cluster page management (2014)
MySQL Cluster page management (2014)Frazer Clement
 
Spatial Data Integrator - Software Presentation and Use Cases
Spatial Data Integrator - Software Presentation and Use CasesSpatial Data Integrator - Software Presentation and Use Cases
Spatial Data Integrator - Software Presentation and Use Casesmathieuraj
 
Android Development - ConstraintLayout
Android Development - ConstraintLayoutAndroid Development - ConstraintLayout
Android Development - ConstraintLayoutManuel Vicente Vivo
 
The Unusual Suspect: Layouts for sleeker KDE applications
The Unusual Suspect: Layouts for sleeker KDE applicationsThe Unusual Suspect: Layouts for sleeker KDE applications
The Unusual Suspect: Layouts for sleeker KDE applicationsOpenBossa
 
Android android layouts
Android android layoutsAndroid android layouts
Android android layoutsperpetrotech
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid drawinfo_zybotech
 

Similar to Java gives us layout managers whose responsibility it is to determine.docx (20)

GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
 
Android practice of layout in application-chapter6
Android practice of layout in application-chapter6Android practice of layout in application-chapter6
Android practice of layout in application-chapter6
 
Layout manager
Layout managerLayout manager
Layout manager
 
LayoutManager_Lec1.pptx
LayoutManager_Lec1.pptxLayoutManager_Lec1.pptx
LayoutManager_Lec1.pptx
 
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
 
View groups containers
View groups containersView groups containers
View groups containers
 
Hello Android
Hello AndroidHello Android
Hello Android
 
java swing
java swingjava swing
java swing
 
RS and GIS TW- 1&2.pdf
RS and GIS TW- 1&2.pdfRS and GIS TW- 1&2.pdf
RS and GIS TW- 1&2.pdf
 
Understanding layout managers
Understanding layout managersUnderstanding layout managers
Understanding layout managers
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
 
Introduction to silverlight control 3
Introduction to silverlight control  3Introduction to silverlight control  3
Introduction to silverlight control 3
 
MySQL Cluster page management (2014)
MySQL Cluster page management (2014)MySQL Cluster page management (2014)
MySQL Cluster page management (2014)
 
Spatial Data Integrator - Software Presentation and Use Cases
Spatial Data Integrator - Software Presentation and Use CasesSpatial Data Integrator - Software Presentation and Use Cases
Spatial Data Integrator - Software Presentation and Use Cases
 
Android Development - ConstraintLayout
Android Development - ConstraintLayoutAndroid Development - ConstraintLayout
Android Development - ConstraintLayout
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
The Unusual Suspect: Layouts for sleeker KDE applications
The Unusual Suspect: Layouts for sleeker KDE applicationsThe Unusual Suspect: Layouts for sleeker KDE applications
The Unusual Suspect: Layouts for sleeker KDE applications
 
Android UI Development
Android UI DevelopmentAndroid UI Development
Android UI Development
 
Android android layouts
Android android layoutsAndroid android layouts
Android android layouts
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid draw
 

More from olsenlinnea427

Assume that X is a discrete random variable that can take on the follo.docx
Assume that X is a discrete random variable that can take on the follo.docxAssume that X is a discrete random variable that can take on the follo.docx
Assume that X is a discrete random variable that can take on the follo.docxolsenlinnea427
 
Assume that in an economy- people hold $1000 of currency and $4000 of.docx
Assume that in an economy- people hold $1000 of currency and $4000 of.docxAssume that in an economy- people hold $1000 of currency and $4000 of.docx
Assume that in an economy- people hold $1000 of currency and $4000 of.docxolsenlinnea427
 
Assume a Poisson distribution with -4-5- Find the following probabilit.docx
Assume a Poisson distribution with -4-5- Find the following probabilit.docxAssume a Poisson distribution with -4-5- Find the following probabilit.docx
Assume a Poisson distribution with -4-5- Find the following probabilit.docxolsenlinnea427
 
Assume a member is selected at random trom the population represented.docx
Assume a member is selected at random trom the population represented.docxAssume a member is selected at random trom the population represented.docx
Assume a member is selected at random trom the population represented.docxolsenlinnea427
 
Assume a list has the following element- write a function to interch.docx
Assume a list has the following element-   write a function to interch.docxAssume a list has the following element-   write a function to interch.docx
Assume a list has the following element- write a function to interch.docxolsenlinnea427
 
Assume a company had no jobs in progress at the beginning of July and.docx
Assume a company had no jobs in progress at the beginning of July and.docxAssume a company had no jobs in progress at the beginning of July and.docx
Assume a company had no jobs in progress at the beginning of July and.docxolsenlinnea427
 
Assignment- Peg Game Create a web page that allows the user to play th.docx
Assignment- Peg Game Create a web page that allows the user to play th.docxAssignment- Peg Game Create a web page that allows the user to play th.docx
Assignment- Peg Game Create a web page that allows the user to play th.docxolsenlinnea427
 
Assignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docx
Assignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docxAssignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docx
Assignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docxolsenlinnea427
 
As part of measures for containing the Covid-19 pandemic- vaccination.docx
As part of measures for containing the Covid-19 pandemic- vaccination.docxAs part of measures for containing the Covid-19 pandemic- vaccination.docx
As part of measures for containing the Covid-19 pandemic- vaccination.docxolsenlinnea427
 
As hematopoietic stem cells (HSC) mature and become differentiated the.docx
As hematopoietic stem cells (HSC) mature and become differentiated the.docxAs hematopoietic stem cells (HSC) mature and become differentiated the.docx
As hematopoietic stem cells (HSC) mature and become differentiated the.docxolsenlinnea427
 
As human populations & ecological footprints approach earth's carrying.docx
As human populations & ecological footprints approach earth's carrying.docxAs human populations & ecological footprints approach earth's carrying.docx
As human populations & ecological footprints approach earth's carrying.docxolsenlinnea427
 
Aries' description of an attitude toward death he called -tame death-.docx
Aries' description of an attitude toward death he called -tame death-.docxAries' description of an attitude toward death he called -tame death-.docx
Aries' description of an attitude toward death he called -tame death-.docxolsenlinnea427
 
Apple Inc- received $350-000 as dividends last year from its investmen.docx
Apple Inc- received $350-000 as dividends last year from its investmen.docxApple Inc- received $350-000 as dividends last year from its investmen.docx
Apple Inc- received $350-000 as dividends last year from its investmen.docxolsenlinnea427
 
Anthony has been living in Western WA for 3 years- After moving from C.docx
Anthony has been living in Western WA for 3 years- After moving from C.docxAnthony has been living in Western WA for 3 years- After moving from C.docx
Anthony has been living in Western WA for 3 years- After moving from C.docxolsenlinnea427
 
answer the questions in Blockchain list 5 point for all of the followi.docx
answer the questions in Blockchain list 5 point for all of the followi.docxanswer the questions in Blockchain list 5 point for all of the followi.docx
answer the questions in Blockchain list 5 point for all of the followi.docxolsenlinnea427
 
Answer the following questions- Question 1- You have implemented a sec.docx
Answer the following questions- Question 1- You have implemented a sec.docxAnswer the following questions- Question 1- You have implemented a sec.docx
Answer the following questions- Question 1- You have implemented a sec.docxolsenlinnea427
 
Answer the following based on a Blockchain and Biometrics I- What t.docx
Answer the following based on a Blockchain and Biometrics    I- What t.docxAnswer the following based on a Blockchain and Biometrics    I- What t.docx
Answer the following based on a Blockchain and Biometrics I- What t.docxolsenlinnea427
 
Anglin Company- a manufacturing firred has supplicd the following info.docx
Anglin Company- a manufacturing firred has supplicd the following info.docxAnglin Company- a manufacturing firred has supplicd the following info.docx
Anglin Company- a manufacturing firred has supplicd the following info.docxolsenlinnea427
 
Angela Lopez owns and manages a consulting firm called Metrixi which b.docx
Angela Lopez owns and manages a consulting firm called Metrixi which b.docxAngela Lopez owns and manages a consulting firm called Metrixi which b.docx
Angela Lopez owns and manages a consulting firm called Metrixi which b.docxolsenlinnea427
 
Andrew finds that on his way to work his wait time for the bus is roug.docx
Andrew finds that on his way to work his wait time for the bus is roug.docxAndrew finds that on his way to work his wait time for the bus is roug.docx
Andrew finds that on his way to work his wait time for the bus is roug.docxolsenlinnea427
 

More from olsenlinnea427 (20)

Assume that X is a discrete random variable that can take on the follo.docx
Assume that X is a discrete random variable that can take on the follo.docxAssume that X is a discrete random variable that can take on the follo.docx
Assume that X is a discrete random variable that can take on the follo.docx
 
Assume that in an economy- people hold $1000 of currency and $4000 of.docx
Assume that in an economy- people hold $1000 of currency and $4000 of.docxAssume that in an economy- people hold $1000 of currency and $4000 of.docx
Assume that in an economy- people hold $1000 of currency and $4000 of.docx
 
Assume a Poisson distribution with -4-5- Find the following probabilit.docx
Assume a Poisson distribution with -4-5- Find the following probabilit.docxAssume a Poisson distribution with -4-5- Find the following probabilit.docx
Assume a Poisson distribution with -4-5- Find the following probabilit.docx
 
Assume a member is selected at random trom the population represented.docx
Assume a member is selected at random trom the population represented.docxAssume a member is selected at random trom the population represented.docx
Assume a member is selected at random trom the population represented.docx
 
Assume a list has the following element- write a function to interch.docx
Assume a list has the following element-   write a function to interch.docxAssume a list has the following element-   write a function to interch.docx
Assume a list has the following element- write a function to interch.docx
 
Assume a company had no jobs in progress at the beginning of July and.docx
Assume a company had no jobs in progress at the beginning of July and.docxAssume a company had no jobs in progress at the beginning of July and.docx
Assume a company had no jobs in progress at the beginning of July and.docx
 
Assignment- Peg Game Create a web page that allows the user to play th.docx
Assignment- Peg Game Create a web page that allows the user to play th.docxAssignment- Peg Game Create a web page that allows the user to play th.docx
Assignment- Peg Game Create a web page that allows the user to play th.docx
 
Assignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docx
Assignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docxAssignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docx
Assignment 2 Application Case 6-5 Efficient Image Recognition and Cate.docx
 
As part of measures for containing the Covid-19 pandemic- vaccination.docx
As part of measures for containing the Covid-19 pandemic- vaccination.docxAs part of measures for containing the Covid-19 pandemic- vaccination.docx
As part of measures for containing the Covid-19 pandemic- vaccination.docx
 
As hematopoietic stem cells (HSC) mature and become differentiated the.docx
As hematopoietic stem cells (HSC) mature and become differentiated the.docxAs hematopoietic stem cells (HSC) mature and become differentiated the.docx
As hematopoietic stem cells (HSC) mature and become differentiated the.docx
 
As human populations & ecological footprints approach earth's carrying.docx
As human populations & ecological footprints approach earth's carrying.docxAs human populations & ecological footprints approach earth's carrying.docx
As human populations & ecological footprints approach earth's carrying.docx
 
Aries' description of an attitude toward death he called -tame death-.docx
Aries' description of an attitude toward death he called -tame death-.docxAries' description of an attitude toward death he called -tame death-.docx
Aries' description of an attitude toward death he called -tame death-.docx
 
Apple Inc- received $350-000 as dividends last year from its investmen.docx
Apple Inc- received $350-000 as dividends last year from its investmen.docxApple Inc- received $350-000 as dividends last year from its investmen.docx
Apple Inc- received $350-000 as dividends last year from its investmen.docx
 
Anthony has been living in Western WA for 3 years- After moving from C.docx
Anthony has been living in Western WA for 3 years- After moving from C.docxAnthony has been living in Western WA for 3 years- After moving from C.docx
Anthony has been living in Western WA for 3 years- After moving from C.docx
 
answer the questions in Blockchain list 5 point for all of the followi.docx
answer the questions in Blockchain list 5 point for all of the followi.docxanswer the questions in Blockchain list 5 point for all of the followi.docx
answer the questions in Blockchain list 5 point for all of the followi.docx
 
Answer the following questions- Question 1- You have implemented a sec.docx
Answer the following questions- Question 1- You have implemented a sec.docxAnswer the following questions- Question 1- You have implemented a sec.docx
Answer the following questions- Question 1- You have implemented a sec.docx
 
Answer the following based on a Blockchain and Biometrics I- What t.docx
Answer the following based on a Blockchain and Biometrics    I- What t.docxAnswer the following based on a Blockchain and Biometrics    I- What t.docx
Answer the following based on a Blockchain and Biometrics I- What t.docx
 
Anglin Company- a manufacturing firred has supplicd the following info.docx
Anglin Company- a manufacturing firred has supplicd the following info.docxAnglin Company- a manufacturing firred has supplicd the following info.docx
Anglin Company- a manufacturing firred has supplicd the following info.docx
 
Angela Lopez owns and manages a consulting firm called Metrixi which b.docx
Angela Lopez owns and manages a consulting firm called Metrixi which b.docxAngela Lopez owns and manages a consulting firm called Metrixi which b.docx
Angela Lopez owns and manages a consulting firm called Metrixi which b.docx
 
Andrew finds that on his way to work his wait time for the bus is roug.docx
Andrew finds that on his way to work his wait time for the bus is roug.docxAndrew finds that on his way to work his wait time for the bus is roug.docx
Andrew finds that on his way to work his wait time for the bus is roug.docx
 

Recently uploaded

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
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
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
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...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

Java gives us layout managers whose responsibility it is to determine.docx

  • 1. Java gives us layout managers whose responsibility it is to determine where on the applet or application space to put the component you want to add to the GUI interface. There are five different layout managers. What are the major differences among them? Share your experiences with layout managers thus far. Solution The LayoutManagers are used to arrange components in a particular manner 1. BorderLayout is to arrange objects in one of five geographical locations: "North," "South," "East," "West," and "Center," possibly with some padding between. BorderLayout is the default layout for Window and Frame objects. Because each component is associated with a direction, BorderLayout can manage at most five components; it squashes or stretches those components to fit its constraints. 2. GridLayout arranges components into regularly spaced rows and columns. The components are arbitrarily resized to fit in the resulting areas; their minimum and preferred sizes are consequently ignored. GridLayout is most useful for arranging very regular, identically sized objects and for allocating space for Panels to hold other layouts in each region of the container. 3. FlowLayout is a simple layout manager that tries to arrange components with their preferred sizes, from left to right and top to bottom in the display. A FlowLayout can have a specified justification of LEFT, CENTER, or RIGHT, and a fixed horizontal and vertical padding. By default, a flow layout uses CENTER justification, meaning that all components are centered within the area allotted to them. FlowLayout is the default for Panel components like Applet. 4. CardLayout is a special layout manager for creating the effect of a stack of cards. Instead of arranging all of the container's components, it displays only one at a time. You would use this kind of layout to implement a hypercard stack or a Windows-style set of configuration screens. When you add a component to the layout, you use
  • 2. the two-argument version of add(); the extra argument is an arbitrary string that serves as the card's name 5. GridBagLayout is a very flexible layout manager that allows you to position components relative to one another using constraints. With GridBagLayout (and a fair amount of effort) you can create almost any imaginable layout. Components are arranged at "logical" coordinates on a abstract grid. We'll call them "logical" coordinates because they really designate positions in the space of rows and columns formed by the set of components. Rows and columns of the grid stretch to different sizes, based on the sizes and constraints of the components they hold.