Computer Knowledge
GUI and Web Frameworks
1,711 Questions
Graphical user interface and web frameworks involve layout management, directives, and application design across platforms like Android and Angular. These concepts are tested in computer science and IT officer competitive exams. Review these questions to understand UI components and coding standards.
Android layout attributesAngular structural directivesVB.Net web methodsJava Swing componentsSiebel application framework
GUI and Web Frameworks Questions
-
Frame
-
Panel
-
Window
-
Dialog
-
Container
B
Correct answer
Explanation
Yes, Panel is the immediate superclass of Applet class in AWT (Abstract Window Toolkit).
B
Correct answer
Explanation
This is the correct answer, there are 5 container classes for AWT components. Container classes are used to contain other GUI components.These container classes are :-WindowPanelAppletFrameDialogSo this is the correct answer.
C
Correct answer
Explanation
This is the correct answer, we can pass minimum 0 arguments and maximum 3 arguments to the FlowLayout constructor. These 3 arguments are :-FlowLayout(int alignment, int horizontalgap, int verticalgap)Alignment:- it can be FlowLayout.LEFT, FlowLayout.RIGHT or FlowLayout.CENTERHorizontalgap : - it specifies the horizontal gap between the components.Verticalgap : - It specifies the vertical gap between the components.So this answer is correct.
C
Correct answer
Explanation
This is the correct answer. We can pass maximum 4 arguments to the GridLayout constructor. These arguments are :-GridLayout(int rows, int columns, int HorizontalGap, int VerticalGap)This will create a gridlayout with specified number of row and columns and with a specific horizontal and vertical gap between the componenets.So this answer is correct.
C
Correct answer
Explanation
This is the correct choice, there are 8 Layout Managers in java. These are :-1. BorderLayout2. BoxLayout3. CardLayout4. FlowLayout5. GridBagLayout6. GridLayout7. GroupLayout8. SpringLayoutSo this is correct choice.
-
Int size
-
String name
-
Int style
-
Int alignment
-
Int Color
A
Correct answer
Explanation
This is the correct answer, we can pass 3 arguments to the constructor of Font Class. These arguments are :-Font(String name, int style, int size)For example :-Font(“SanSerif”, Font.BOLD,20)The third argument specifies the size of the font.So this is the correct answer.
D
Correct answer
Explanation
This is the correct answer we can pass maximum 2 arguments to the BorderLayout Constructor. These arguments are :-BorderLayout(int horizontalgap, int verticalgap)This will create a BorderLayout with specified horizontal and vertical gap between the components.So this is the correct answer.
-
Int rows
-
Int columns
-
Int HorizontalGap
-
Int VerticalGap
-
Int Alignmnent
C
Correct answer
Explanation
This is the correct answer. We can pass maximum 4 arguments to the GridLayout constructor. These arguments are :-GridLayout(int rows, int columns, int HorizontalGap, int VerticalGap)This will create a gridlayout with specified number of row and columns and with a specific horizontal and vertical gap between the componenets.So the third argument is HorizontalGap.So this answer is correct.
-
LayoutManager
-
Colour
-
Font
-
Dimensions
-
Graphics
B
Correct answer
Explanation
This is the correct answer, there is no helper class in java AWT named Colour. The correct spelling are Color. This class deals with the colours of the GUI components.So this is the correct answer.
-
BorderLayout
-
CardLayout
-
FlowLayout
-
GridLayout
-
BoxLayout
C
Correct answer
Explanation
This is the correct answer because when we create a panel, its default Layout Manager is FlowLayout.So in this case the Panel p1 will have FlowLayout.So this answer is correct.
C
Correct answer
Explanation
This is the correct answer, we can pass 3 arguments to the constructor of Font Class. These arguments are :-Font(String name, int style, int size)For example :-Font(“SanSerif”, Font.BOLD,20)So this is the correct answer.
-
Int horizontalGap
-
Int VerticalGap
-
Int Alignment
-
Int Rows
-
Int Columns
B
Correct answer
Explanation
This is the correct answer, we can pass 3 arguments to the FlowLayout constructor. These 3 arguments are :-FlowLayout(int alignment, int horizontalgap, int verticalgap)Alignment:- it can be FlowLayout.LEFT, FlowLayout.RIGHT or FlowLayout.CENTERHorizontalgap : - it specifies the horizontal gap between the components.Verticalgap : - It specifies the vertical gap between the components.So the third argument is VerticalGao, so this answer is correct.
-
Window
-
Applet
-
Panel
-
Dimension
-
Dialog
D
Correct answer
Explanation
This answer is correct, because Dimensions is the one of the Helper Classes present in Java AWT. This class encapsulates the width and the height of the component in a single object.So this is correct choice.
-
Int rows
-
Int columns
-
Int horizontalGap
-
Int VerticalGap
-
Int Alignment
B
Correct answer
Explanation
This is the correct answer. We can pass maximum 4 arguments to the GridLayout constructor. These arguments are :-GridLayout(int rows, int columns, int HorizontalGap, int VerticalGap)This will create a gridlayout with specified number of row and columns and with a specific horizontal and vertical gap between the componenets.So the second argument is Columns.So this answer is correct.
-
Int alignment
-
Int horizontalGap
-
Int VerticalGap
-
Int Rows
-
None of these
E
Correct answer
Explanation
This is the correct answer we can pass maximum 2 arguments to the BorderLayout Constructor. These arguments are :-BorderLayout(int horizontalgap, int verticalgap)This will create a BorderLayout with specified horizontal and vertical gap between the components.There is no third argument.So this is the correct answer.