Solved Ajp QB
Solved Ajp QB
1.Combobox is a combination of
a)textfield and drop down list b)checkboxes c)textareas d)None
14.When applet is dead, it automatically invokes the ______method when we quit the browser.
a)paint() b) stop() c) destroy() d) final()
15.Which of the following applet method displays the result of the applet code on the screen?
a) paint() b)void() c)init() d)start()
21.In Graphics class which method is used to set the graphics current color to the specified color?
a) public abstract void setFont(Font fontobj) b) public abstract void setColor(Color c)
c) public abstract void grawString(String str, int x,I nt y) d) None of above
23.Which of the following methods can be used to remove java.awt.Component object from
display?
a) hide() b) disappear() c) remove() d) delete()
29.Choose the following type in which we can work on other parts of the program.
a) modeless b) model c) both a and b d) dialog
43.The ActionListener interface is used for handling action events, For example, it's used by a
(a) JButton (b) JCheckbox (c) All of these (d) JMenuItem
45 Which package provides many event classes andListener interfaces for event handling?
(a) java.awt (b) java.awt.Graphics
(c) java.awt.event (d) None of the above
52 The signature for the registration method for a ActionEvent should be _______.
(a) public void addActionListener(ActionEvent L)
(b) public void setAction(ActionListener L)
(c) public void setActionListener(ActionListener L)
(d) public void addActionListener(ActionListenerL)
58
58In swing, Buttons are subclasses of which class?
(a) AbstractButton (b) JButton
(c) Button (d) JRadioButton
59 JTree class belongs to which package?
(a) java.awt (b) java.applet
(c) java.swing (d) javaxswing