WorksheetsQuiz 5: Java Swing
Total questions: 35
Worksheet time: 18mins
1. Which of the following architecture does the Swing framework use?
MVC
MVP
Layered architecture
Master-Slave architecture
2. Which language is used in the swing framework?
JavaScript
Java
React
Python
A ____ is the abstract foundation class for SWING's non-menu user interface controls?
Container
Jcomponent
Component
None of the above
A ____ is the basic class for all SWING UI components?
Container
Jcomponent
Component
None
A ____ is a one-line input field that allows the user to choose a number or an object value from an ordered sequence?
JTextarea
Jtextfield
Jspinner
Jslider
A ____ control is a dialogue window that allows the user to pick a file?
JChoosFile
JFilefield
JFile
JFileChooser
An ____ is a change in the state of an item?
Spinner
Event
Occurrence
Activity
How many types of events are there?
5
3
2
4
Which of the following type of events requires direct interaction with the user?
Foreground events
Background events
Which of the following type of events requires direct interaction with the end-user?
Foreground events
Background events
To manage events, Java employs the ____?
Custom-based Event Model
Retired Event Model
Delegation Event Model
Which of the following function is used to generate the application's top-level window?
JPanel
JFrame
JCombo
____ is a container for other components and is used to build bespoke panels for organizing and arranging components?
JPanel
JFrame
JCombo
JBox
Which of the following component gives a drop-down list of options from which to choose?
JPanel
JButton
JComboBox
JBox
____ are classes that act as a connection point between event listeners and event sources?
Event adapters
Events Handler
Event listener
Jevent
The ____ class serves as the foundation for all Swing components.
JButton
JComponent
JTextField
In Swing, the ____ is used to render visuals and listen for events?
Event adapters
Events Handler
Event listener
Event-Driven Thread
Among AWT and Swing which is platform independent?
AWT
Swing
Swing framework is ____ component?
Heavyweight
Lightweight
The ____ class enables the development of abstract functions as well as action interfaces.
Action
Abstraction
AbstractionAction
____ is a data transfer class that provides an easy way to transport data from the Jcomponent.
DataShare
Transfer
DataTransfer
TransferHandler
invokeandwait() method in Swing framework is ____.
Synchronous
Asynchronous
invokelater() method in Swing framework is ____?
Synchronous
Asynchronous
An ____ is a short software that runs in a web browser.
Application
AWT
Applet
JFrame
Is Applet and Application both are same in the swing framework?
Yes
No
The act of turning the state of a Swing component or set of components into a stream of bytes that can be saved to a file or transferred over a network is referred to as ____ in Swing.
serialisation
Accessibility
Localization
Globalization
A ____ is a Swing framework component that offers a scroll bar that may be used to scroll content in a container.
JScrollPanel
JScrollBox
JScroll
JScrollBar
A ____ is a container that provides a viewport for showing a piece of a bigger component.
JScrollPanel
JScrollBox
JScroll
JScrollPane
EDT in Swing framework stands for ____.
Event Driven thread
Event Determined Thread
Electronic-event-driven thread
A ____ is a type of object that organizes components in a container.
Event adapter
Event Handler
layout manager
Grid Manager
The ____ function allows you to paint with a Graphics object.
AllPaint()
Jpaint()
Repaint()
paint()
Is Swing thread-safe?
Yes
No
The ____ function is used to specify the layout of a container.
UseLayeout()
setLayout()
layout()
DesignLayout()
____ method validates the components of a container.
Validate()
Examine()
Analyze()
Which of the following companies are using swing framework?
IBM
Oracle
Microsoft
All of the above
