
i. GridLayout
Arranges components into rows and columns
In Frame’s constructor:
setLayout(new GridLayout(rows,columns))
OR
setLayout(new GridLayout(rows,columns,hgap,vgap))
Components will be added in order, left to right, row by row
Components will be equal in size
As container is resized, components will resize accordingly, and remain in same grid arrangement
ii. BorderLayout
Arranges components into five areas: North, South, East, West, and Center
In the constructor:
setLayout(new BorderLayout())
OR
setLayout(new BorderLayout(hgap,vgap))
for each component:
add (the_component, region)
do for each area desired:
BorderLayout.EAST, BorderLayout.SOUTH, BorderLayout.WEST, BorderLayout.NORTH, or
BorderLayout.CENTER
Behavior: when the container is resized, the components will be resized but remain in the same locations.
NOTE: only a maximum of five components can be added and seen in this case, one to each region.
iii. FlowLayout
Places components sequentially (left-to-right) in the order they were added
Components will wrap around if the width of the container is not wide enough to hold them all in a row.
Default for applets and panels, but not for frames
Options: left, center (this is the default), or right Typical syntax: in your Frame class’s constructor
setLayout(new FlowLayout(FlowLayout.LEFT)) OR
setLayout(new FlowLayout(FlowLayout.LEFT,hgap,vgap))
gregorymasila answered the question on January 24, 2018 at 17:42
-
Explain the difference between the AWT components and the Swing Components using examples
(Solved)
Explain the difference between the AWT components and the Swing Components using examples
Date posted:
January 24, 2018
.
Answers (1)
-
Distinguish between abstract classes and interfaces
(Solved)
Distinguish between abstract classes and interfaces
Date posted:
January 24, 2018
.
Answers (1)
-
Java exception handling is managed by five keywords: state and discuss the role of each of the keywords.
(Solved)
Java exception handling is managed by five keywords: state and discuss the role of each of the keywords.
Date posted:
January 24, 2018
.
Answers (1)
-
State four differences between Java applications and Java applets programming.
(Solved)
State four differences between Java applications and Java applets programming.
Date posted:
January 24, 2018
.
Answers (1)
-
State and explain four advantages of Java as an object oriented programming language.
(Solved)
State and explain four advantages of Java as an object oriented programming language.
Date posted:
January 24, 2018
.
Answers (1)
-
Briefly describe what it means by business object analysis?
(Solved)
Briefly describe what it means by business object analysis?
Date posted:
January 24, 2018
.
Answers (1)
-
Define a model and briefly discuss the two types of models
(Solved)
Define a model and briefly discuss the two types of models
Date posted:
January 24, 2018
.
Answers (1)
-
What is generalization? Give its advantage.
(Solved)
What is generalization? Give its advantage.
Date posted:
January 24, 2018
.
Answers (1)
-
Briefly discuss UML and State significance of the Unified Modeling Language (UML) in object orientation
(Solved)
Briefly discuss UML and State significance of the Unified Modeling Language (UML) in object orientation
Date posted:
January 24, 2018
.
Answers (1)
-
Outline some characteristics of a bad design?
(Solved)
Outline some characteristics of a bad design?
Date posted:
January 24, 2018
.
Answers (1)
-
State the significance of analysis in object-oriented approach to systems development.
(Solved)
State the significance of analysis in object-oriented approach to systems development.
Date posted:
January 24, 2018
.
Answers (1)
-
Define inheritance
(Solved)
Define inheritance
Date posted:
January 24, 2018
.
Answers (1)
-
Briefly explain the main phases of USDP.
(Solved)
Briefly explain the main phases of USDP.
Date posted:
January 24, 2018
.
Answers (1)
-
Identify and discuss five aspects of human intelligence that could be used to characterize intelligent knowledge based systems.
(Solved)
Identify and discuss five aspects of human intelligence that could be used to characterize intelligent knowledge based systems.
Date posted:
January 9, 2018
.
Answers (1)
-
Define a table.
(Solved)
Define a table.
Date posted:
January 3, 2018
.
Answers (1)
-
What could form the source of information for developers of a new system?
(Solved)
What could form the source of information for developers of a new system?
Date posted:
December 18, 2017
.
Answers (1)
-
Identify the main participants in the systems development process
(Solved)
Identify the main participants in the systems development process
Date posted:
December 18, 2017
.
Answers (1)
-
State the THREE advantages and THREE disadvantages of using CASE tools in the systems development process.
(Solved)
State the THREE advantages and THREE disadvantages of using CASE tools in the systems development process.
Date posted:
December 18, 2017
.
Answers (1)
-
What could lead to changes to the original project plan?
(Solved)
What could lead to changes to the original project plan?
Date posted:
December 18, 2017
.
Answers (1)
-
MIS projects if not well managed can fail. What causes project failure?
(Solved)
MIS projects if not well managed can fail. What causes project failure?
Date posted:
December 18, 2017
.
Answers (1)