Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
151 views
in Programming by (72.6k points)
closed by
In java, which layout manager preserves the width and height of the components?
1. FlowLayout
2. BorderLayout
3. BoxLayout
4. GridLayout

1 Answer

0 votes
by (121k points)
selected by
 
Best answer
Correct Answer - Option 3 : BoxLayout

FlowLayout

It arranges the components in a container like the words on a page. It fills the top line from left to right and top to bottom

BorderLayout

It arranges all the components along the edges or the middle of the container i.e. top, bottom, right and left edges of the area. 

GridLayout

It arranges all the components in a grid of equally sized cells, adding them from the left to right and top to bottom. 

BoxLayout

It arranges multiple components in either vertically or horizontally, but not both. The components are arranged from left to right or top to bottom

Therefore Correct answer is Option 3

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...