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. What is the difference between the paint() and repaint() methods? The paint() method supports painting via a Graphics object. The repaint() method is used to cause paint() to be invo...
About Java and it's related concepts..