Computer Knowledge
GUI and Web Frameworks
1,915 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
-
javax.swing.text.rtf
-
javax.swing.text
-
javax.swing.text.html.parser
-
OrbixWeb
-
2D API
B
Correct answer
Explanation
This package in swing libraries provides score of text based classes and interfaces supporting a common design known as document/view?
-
javax.swing.text.html.parser
-
javax.swing.table
-
javax.swing.text.rtf
-
2D API
-
WebSphere
B
Correct answer
Explanation
This package in swing libraries allows you to arrange various information in a grid-based format.
-
javax.swing.text.html
-
javax.swing.text.html.parser
-
javax.swing.text.rtf
-
2D API
-
Stock
C
Correct answer
Explanation
This swing package is used specifically for reading and formatting RTF text through an ancillary editor kit.
-
2D API
-
Java applet
-
Java beans
-
Abstract window toolkit
-
WebSphere
D
Correct answer
Explanation
It provides a rich set of user interface components including graphics and imaging tools, layout managers for flexible window layouts, etc?
-
Frame
-
Panel
-
Both 1 and 2
-
None of these
C
Correct answer
Explanation
Both Frame and Panel are containers in Java AWT. A Frame is a top-level window with a title bar, while a Panel is a generic container used to group components.
D
Correct answer
Explanation
Java AWT supports 5 layout managers: BorderLayout, FlowLayout, GridLayout, CardLayout, and GridBagLayout. These are the standard layouts for arranging components.
-
java.awt.*
-
java.applet.*
-
both 1 and 2
-
none of these
C
Correct answer
Explanation
Both java.awt.* and java.applet.* packages are needed for applets. java.applet.Applet is the base class, while java.awt provides the GUI components.
-
applet viewer tool
-
show applet tool
-
display applet tool
-
appletviewer tool
D
Correct answer
Explanation
appletviewer is the JDK tool specifically designed to test and view Java applets without needing a full web browser. The other options (applet viewer tool, show applet tool, display applet tool) are descriptive phrases but not the actual command-line tool name. The correct tool is invoked with 'appletviewer' followed by the HTML file containing the applet tag.
A
Correct answer
Explanation
CardLayout in Java AWT stores multiple components in a stack-like structure, where only one component is visible at a time. Each component can be thought of as a 'card' in the stack, and you can flip through them to show different components. This is different from QueueLayout, ListLayout, or FlowLayout which don't use stack-based storage.
-
grid layout
-
card layout
-
grid bag layout
-
flow layout
D
Correct answer
Explanation
FlowLayout is the default layout manager for Applet (and Panel) in Java AWT. It arranges components in a left-to-right, top-to-bottom flow, similar to text in a paragraph. When a row fills up, components wrap to the next line. GridLayout, CardLayout, and GridBagLayout must be explicitly set and are not the default for applets.
-
JTollTip
-
javax.swing.text.html
-
JTextArea
-
Events
-
JTree
A
Correct answer
Explanation
This swing component can display a small amount of text to indicate the name or purpose of a component.
-
ActionEvent
-
AdjustmentEvent
-
MouseEvent
-
The StackFrame
-
Events
B
Correct answer
Explanation
This object is generated when scroll bars and other adjustable elements are used.
-
PaintEvent
-
Events
-
MouseEvent
-
ActionEvent
-
Stock
A
Correct answer
Explanation
This object in the java.util.EventObject is generated when a component is painted.
-
Abstract window toolkit
-
Drag and drop
-
javax.swing.text.rtf
-
JTree
-
Events
A
Correct answer
Explanation
This technology in JFC features a robust event-handling model.
-
javax.swing.text.rtf
-
javax.swing.text.html
-
JTextArea
-
Events
-
javax.swing.text.html.parser
E
Correct answer
Explanation
This package in the swing libraries contains support for parsing hypertext markup language.