Java Swing Mcq Questions and Answers

Related Topics:

Java Programming : Java Swings

Here are the Java Swing Questions and answers with the Free PDFs to download.
1. Package of drawstring() method is
[A] java.applet
[C] javax.swing
[D] java.awt

Answer: D. java.awt


This method is used in java,awt package.
2. Which method executes only once
[A] start() method
[B] init() method
[C] stop() method
[D] destroy() method

Answer: B. init() method


This method is execute only once
3. Give the abbreviation of AWT?
[A] Applet Windowing Toolkit
[B] Abstract Windowing Toolkit
[C] Absolute Windowing Toolkit
[D] None of the above

Answer: B. Abstract Windowing Toolkit


Every Swing component relies on an AWT container
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

Answer: B. Frame


A Frame is a top-level window with a title and a border. The size of the frame includes any area designated for the border
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

Answer: B. Container


Containers are integral part of SWING GUI components
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
[C] Both A & B
[D] None of the above

Answer: A. Swing


Swing is a GUI widget toolkit for Java
7. Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application?
[A] True
[B] False

Answer: B. False


8. Which class provides many methods for graphics programming?
[A] java.awt
[B] java.Graphics
[C] java.awt.Graphics
[D] None of the above

Answer: C. java.awt.Graphics


java.awt.Graphics package provide various method for graphics .
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

Answer: A. True


A Frame is a top-level window with a title and a border. The size of the frame includes any area designated for the border.
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

Answer: C. Event Handling


Event handling is required when we implements interface.

Comments: (Your feedback is valuable to us)

Sharda bhalerao 3 weeks ago Reply


suraj kokitkar 3 months ago Reply


sneha mole 3 months ago Reply

I hope it will help me in todays exam thanks

Madhuri kadam 1 year ago Reply

Need to add more Quations

madhura more 1 year ago Reply


Hab 1 year ago Reply


dinakar 1 year ago Reply


bhagu 1 year ago Reply

not a good unexpected result

aditi 1 year ago Reply


Shourya Reddy 2 years ago Reply

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

Narasimha Rao Kandula 2 years ago Reply