21st November 2012, 04:12 PM
Sr. FaaDoO Engineer
Top Java Swing Interview Questions and Answers
What is the difference between Swing and AWT components?
AWT components are heavy-weight, whereas Swing components are lightweight. Hence Swing works faster than AWT. Heavy weight components depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component. Pluggable look and feel possible using java Swing. Also, we can switch from one look and feel to another at runtime in swing which is not possible in AWT.
Name the containers which use Border Layout as their default layout?
window, Frame and Dialog classes.
Name Container classes.
Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane
How can a GUI component handle its own events?
A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.
Tags for this Thread