Free Jobs

click here

click here
Swing Interview Questions(Basic)

For more advanced and tough Swing Interview Questions Click Here

Q1. What is swing?
Swing is a toolkit for Java and it is part of Java Foundation Classes (JFC),an API for providing a graphical user interface for Java programs.

Q2. What is JFC?
JFC stands for Java Foundation Classes.It is set of Java class libraries provided as part of Java 2 Platform.

Q3.What is AWT?
AWT stands for Abstract Window Toolkit. It enables programmers to develop Java applications with GUI components,like windows, and buttons.

Q4. Enumerate the differences between AWT and Swing?
a)AWT has heavy-weight components while Swing has light-weight components.
b)AWT is OS dependent because while Swing is OS independent.
c)AWT takes more memory compared to Swing.

Q5. What is the advantage of double buffering ?
By the use of double buffering we can transfer data faster to and from an I/O device. Double buffering uses two buffers to temporarily hold data being moved to and from an I/O device thus one buffer can be filled when the other is being emptied.

Q6. What do you mean by clipping?
Clipping can be defined as the process of confining paint operations to a limited area.

Q7. What is the use of setLayout() method?
The setLayout() method is used to specify a container's layout.

Q8. What is the use of setBounds() method?
The setBounds() method of the Component class is for setting the position and size of a component.

Q9.Explain the difference between invokeAndWait() and invokeLater()?
invokeAndWait is synchronous while InvokeLater is asynchronous.

Q10.Explain How a GUI component handles its own events?
A GUI component handles its own events by implementing the required event-listener interface and adding itself as its own event listener.

For more advanced and tough Swing Interview Questions Click Here Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)