By Ramakrishna on Jul 21, 2008 in swings interview questions | 0 Comments
Q) In which package are most of the AWT events that support the event-delegation model defined? A) Most of the AWT-related events of the event-delegation model are defined in the java.awt.event package. The AWTEvent class is defined in the java.awt package. Q) Which class is the immediate superclass of the MenuComponent class? A) Object Q) [...]
By Ramakrishna on Jul 21, 2008 in swings interview questions | 0 Comments
Q) What is the difference between a Choice and a List? A) A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices. Only one item may be selected from a Choice. A List may be displayed in such a way that several List [...]
By Ramakrishna on Jul 21, 2008 in swings interview questions | 0 Comments
Q) Can a class be it’s own event handler? Explain how to implement this. A: Sure. an example could be a class that extends Jbutton and implements ActionListener. In the actionPerformed method, put the code to perform when the button is pressed. Q) Why does JComponent have add() and remove() methods but Component does not? [...]