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)
- Explain the following terms:
i. Inheritance
ii. Encapsulation
iii. Polymorphism(Solved)
Explain the following terms:
Explain the following terms:
i. Inheritance
ii. Encapsulation
iii. Polymorphism
Date posted: January 24, 2018. Answers (1)
- By use of relevant examples, state the difference between
i. Statement and a block.
ii. Superclass and subclass
iii. Function overloading and overriding(Solved)
By use of relevant examples, state the difference between
i. Statement and a block.
ii. Superclass and subclass
iii. Function overloading and overriding
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)
- Explain the benefits of the Unified Software Development Process (USDP).
(Solved)
Explain the benefits of the Unified Software Development Process (USDP).
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)
- Most experts agree on a set of common principles of quality software: Briefly discuss the design principles stated below (Solved)
Most experts agree on a set of common principles of quality software: Briefly discuss the design principles stated below:
Reusability
Reliability
Robustness
Extensibility
Scalability
Date posted: January 19, 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)
- After the system is operational, post-implementation evaluation performed. How is this
conducted and what is its significance?(Solved)
After the system is operational, post-implementation evaluation performed. How is this
conducted and what is its significance?
Date posted: December 18, 2017. Answers (1)