Java Swing Mcq Questions and Answers

Here are the Java Swing Questions and answers with the Free PDFs to download.
1. Package of drawstring() method is
[A] java.applet
[B] java.io
[C] javax.swing
[D] java.awt
Loading...
2. Which method executes only once
[A] start() method
[B] init() method
[C] stop() method
[D] destroy() method
Loading...
3. Give the abbreviation of AWT?


[A] Applet Windowing Toolkit
[B] Abstract Windowing Toolkit
[C] Absolute Windowing Toolkit
[D] None of the above
Loading...
4. Which is the container that contain title bar and can have MenuBars. It can have other components like button, textfield etc.?




[A] Panel
[B] Frame
[C] Window
[D] Container
Loading...
5. Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?

[A] Window
[B] Container
[C] Panel
[D] Frame
Loading...
6. The following specifies the advantages of
It is lightweight.
It supports pluggable look and feel.
It follows MVC (Model View Controller) architecture.


[A] Swing
[B] AWT
[C] Both A & B
[D] None of the above
Loading...
7. Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application?

[A] True
[B] False
Loading...
8. Which class provides many methods for graphics programming?

[A] java.awt
[B] java.Graphics
[C] java.awt.Graphics
[D] None of the above
Loading...
9. These two ways are used to create a Frame
By creating the object of Frame class (association)
By extending Frame class (inheritance)

A) True
B) False
[A] True
[B] False
Loading...
10. The Following steps are required to perform
1) Implement the Listener interface and overrides its methods
2) Register the component with the Listener

[A] Exception Handling
[B] String Handling
[C] Event Handling
[D] None of the above
Loading...
Are these questions helpful for you?

Comments: (Your feedback is valuable to us)

ABHISHEK KUMAR 4 months ago Reply

My self abhishek kumar .I read this website and its contents are very good for IT students.


sneha mole 1 year ago Reply

I hope it will help me in todays exam thanks


Shourya Reddy 3 years ago Reply

best way of learning bits........