Java Interview Questions On Applet and Swing |
32. What is the difference between a Scrollbar and a ScrollPane?
Answer
A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. A ScrollPane handles its own events and performs its own scrolling. |
33. What are the problems faced by Java programmers who don't use layout managers?
Answer
Without layout managers, Java programmers are faced with determining how their GUI will be displayed across multiple windowing systems and finding a common sizing and positioning that will work within the constraints imposed by each windowing system. |
34. Difference between Swing and Awt?
Answer
AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT. |
35. How are the elements of a GridBagLayout organized?
Answer
The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes. |
36. What is a layout manager?
Answer
A layout manager is an object that is used to organize components in a container. |