Answer these Java AWT And Swing MCQs and see how sharp is your knowledge of Java AWT And Swing. Scroll down and let's start!
A. AbstractButton
B. ImageIcon
C. ButtonGroup
D. JButton
A. False
B. True
A. Public abstract void drawOval(int x, int y, int width, int height)
B. Public abstract void drawLine(int x1, int y1, int x2, int y2)
C. Public void drawRect(int x, int y, int width, int height)
D. Public abstract void fillRect(int x, int y, int width, int height)
A. Inheritance
B. Association
C. Inheritance And association
D. None
The Following steps are required to perform
1) Implement the Listener interface and overrides its methods
2) Register the component with the Listener
A.
String Handling
B.
Event Handling
C.
Exception Handling
D.
None
A. Public abstract void setFont(Font font)
B. Public abstract void drawString(String str, int x, int y)
C. Public abstract void setColor(Color c)
D. None
A. None
B. Scrollbar,Component,Button
C. Button,List,MenuItem
D. Button,Checkbox,Choice
A. None
B. SetText()
C. GetText() And setText()
D. GetText()
A. Other class
B. All
C. Annonymous class
D. Same class
A. Graphics class
B. Graphics class And Component class
C. Component class
D. None
A. Window
B. Container
C. Panel
D. Frame
A. Container
B. Window
C. Frame
D. Panel
The following specifies the advantages of
It is lightweight.
It supports pluggable look and feel.
It follows MVC (Model View Controller) architecture.
A. AWT And Swing
B. AWT
C. None
D. Swing
These two ways are used to create a Frame
By creating the object of Frame class (association)
By extending Frame class (inheritance)
A. False
B. True
A. False
B. True